|
3661.
|
|
|
Tape Drives
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/backups.xml:472(title)
|
|
3662.
|
|
|
A tape drive attached to the server can be used instead of a NFS share. Using a tape drive simplifies archive rotation, and taking the media off site as well.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/backups.xml:473(para)
|
|
3663.
|
|
|
When using a tape drive the filename portions of the script aren't needed because the date is sent directly to the tape device. Some commands to manipulate the tape are needed. This is accomplished using <application>mt</application>, a magnetic tape control utility part of the <application>cpio</application> package.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/backups.xml:477(para)
|
|
3664.
|
|
|
Here is the shell script modified to use a tape drive:
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/backups.xml:482(para)
|
|
3665.
|
|
|
![](/@@/translation-newline)
#!/bin/bash ![](/@@/translation-newline)
#################################### ![](/@@/translation-newline)
# ![](/@@/translation-newline)
# Backup to tape drive script. ![](/@@/translation-newline)
# ![](/@@/translation-newline)
####################################
![](/@@/translation-newline)
# What to backup. ![](/@@/translation-newline)
backup_files="/home /var/spool/mail /etc /root /boot /opt"
![](/@@/translation-newline)
# Where to backup to. ![](/@@/translation-newline)
dest="/dev/st0"
![](/@@/translation-newline)
# Print start status message. ![](/@@/translation-newline)
echo "Backing up $backup_files to $dest" ![](/@@/translation-newline)
date ![](/@@/translation-newline)
echo
![](/@@/translation-newline)
# Make sure the tape is rewound. ![](/@@/translation-newline)
mt -f $dest rewind
![](/@@/translation-newline)
# Backup the files using tar. ![](/@@/translation-newline)
tar czf $dest $backup_files
![](/@@/translation-newline)
# Rewind and eject the tape. ![](/@@/translation-newline)
mt -f $dest rewoffl
![](/@@/translation-newline)
# Print end status message. ![](/@@/translation-newline)
echo ![](/@@/translation-newline)
echo "Backup finished" ![](/@@/translation-newline)
date
|
|
|
represents a line break.
Start a new line in the equivalent position in the translation.
|
|
|
represents a space character.
Enter a space in the equivalent position in the translation.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/backups.xml:485(programlisting)
|
|
3666.
|
|
|
The default device name for a SCSI tape drive is <filename>/dev/st0</filename>. Use the appropriate device path for your system.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/backups.xml:519(para)
|
|
3667.
|
|
|
Restoring from a tape drive is basically the same as restoring from a file. Simply rewind the tape and use the device path instead of a file path. For example to restore the <filename>/etc/hosts</filename> file to <filename>/tmp/etc/hosts</filename>:
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/backups.xml:524(para)
|
|
3668.
|
|
|
mt -f /dev/st0 rewind
|
|
|
|
mt -f /dev/st0 rewind
|
|
Translated by
Alexandru Iacob
|
|
Reviewed by
Adi Roiban
|
|
|
|
Located in
serverguide/C/backups.xml:529(command)
|
|
3669.
|
|
|
tar -xzf /dev/st0 -C /tmp etc/hosts
|
|
|
|
tar -xzf /dev/st0 -C /tmp etc/hosts
|
|
Translated by
Alexandru Iacob
|
|
Reviewed by
Adi Roiban
|
|
|
|
Located in
serverguide/C/backups.xml:530(command)
|
|
3670.
|
|
|
Bacula
|
|
|
|
Bacula
|
|
Translated by
Alexandru Iacob
|
|
Reviewed by
Adi Roiban
|
|
|
|
Located in
serverguide/C/backups.xml:535(title)
|