|
3620.
|
|
|
To execute the <application>backup.sh</application> script listed above using <application>cron</application>. Enter the following from a terminal prompt:
|
|
|
|
(no translation yet)
|
|
Translated by
Adi Roiban
|
|
Reviewed by
Adi Roiban
|
|
|
|
Located in
serverguide/C/backups.xml:215(para)
|
|
3621.
|
|
|
sudo crontab -e
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/backups.xml:220(command)
|
|
3622.
|
|
|
Using <application>sudo</application> with the <application>crontab -e</application> command edits the <emphasis>root</emphasis> user's crontab. This is necessary if you are backing up directories only the root user has access to.
|
|
|
|
(no translation yet)
|
|
Translated by
Adi Roiban
|
|
Reviewed by
Adi Roiban
|
|
|
|
Located in
serverguide/C/backups.xml:223(para)
|
|
3623.
|
|
|
Add the following entry to the <filename>crontab</filename> file:
|
|
|
|
(no translation yet)
|
|
Translated by
Adi Roiban
|
|
Reviewed by
Adi Roiban
|
|
|
|
Located in
serverguide/C/backups.xml:228(para)
|
|
3624.
|
|
|
# m h dom mon dow command
0 0 * * * bash /usr/local/bin/backup.sh
|
|
|
represents a line break.
Start a new line in the equivalent position in the translation.
|
|
|
|
# m h dom mon dow command
0 0 * * * bash /usr/local/bin/backup.sh
|
|
Translated by
Cristi Nistor
|
|
Reviewed by
Adi Roiban
|
|
|
|
Located in
serverguide/C/backups.xml:231(programlisting)
|
|
3625.
|
|
|
The <application>backup.sh</application> script will now be executed every day at 12:00 am.
|
|
|
|
(no translation yet)
|
|
Translated by
Adi Roiban
|
|
Reviewed by
Adi Roiban
|
|
|
|
Located in
serverguide/C/backups.xml:235(para)
|
|
3626.
|
|
|
The <application>backup.sh</application> script will need to be copied to the <filename>/usr/local/bin/</filename> directory in order for this entry to execute properly. The script can reside anywhere on the file system simply change the script path appropriately.
|
|
|
|
(no translation yet)
|
|
Translated by
Adi Roiban
|
|
Reviewed by
Adi Roiban
|
|
|
|
Located in
serverguide/C/backups.xml:239(para)
|
|
3627.
|
|
|
For more in depth <application>crontab</application> options see <xref linkend="backup-shellscript-references"/>.
|
|
|
|
(no translation yet)
|
|
Translated by
Adi Roiban
|
|
Reviewed by
Adi Roiban
|
|
|
|
Located in
serverguide/C/backups.xml:244(para)
|
|
3628.
|
|
|
Restoring from the Archive
|
|
|
|
(no translation yet)
|
|
Translated by
Adi Roiban
|
|
Reviewed by
Adi Roiban
|
|
|
|
Located in
serverguide/C/backups.xml:250(title)
|
|
3629.
|
|
|
Once an archive has been created it is important to test the archive. The archive can be tested by listing the files it contains, but the best test is to <emphasis>restore</emphasis> a file from the archive.
|
|
|
|
(no translation yet)
|
|
Translated by
Adi Roiban
|
|
Reviewed by
Adi Roiban
|
|
|
|
Located in
serverguide/C/backups.xml:251(para)
|