|
1956.
|
|
|
It is good practice to take backup media off site in case of a disaster. In the shell script example the backup media is another server providing an NFS share. In all likelyhood taking the NFS server to another location would not be practical. Depending upon connection speeds it may be an option to copy the archive file over a WAN link to a server in another location.
|
|
|
|
(no translation yet)
|
|
|
|
1957.
|
|
|
Another option is to copy the archive file to an external hard drive which can then be taken off site. Since the price of external hard drives continue to decrease it may be cost affective to use two drives for each archive level. This would allow you to have one external drive attached to the backup server and one in another location.
|
|
|
|
Iná možnosť je skopírovanie archívu na externé médium, ktoré je možné vybrať z počítača a umiestniť ho na bezpečné miesto. Vďaka tomu, že cena mechaník stále klesá, môžeme použiť dve mechaniky. To nám umožní mať jednu mechaniku pripojenú k serveru so zálohami a jednu na inom mieste.
|
|
Translated and reviewed by
Peter Mráz
|
In upstream: |
|
(not translated yet)
|
|
|
|
Located in
serverguide/C/backups.xml:465(para)
|
|
1958.
|
|
|
Tape Drives
|
|
|
|
Pásková mechanika
|
|
Translated and reviewed by
Peter Mráz
|
|
|
|
Located in
serverguide/C/backups.xml:472(title)
|
|
1959.
|
|
|
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.
|
|
|
|
Páskovú mechaniku pripojenú k serveru môžeme použiť miesto zdieľaného priečinka cez NFS. Použitie páskovej mechaniky zjednodušuje rotáciu archívov a tiež umožňuje uchovávať záložné médium v bezpečí.
|
|
Translated and reviewed by
Peter Mráz
|
|
|
|
Located in
serverguide/C/backups.xml:473(para)
|
|
1960.
|
|
|
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.
|
|
|
|
Pri použití páskovej mechaniky nie je potrebná časť skriptu, ktorá vytvára meno archívu, pretože sa údaje odošlú priamo na páskovú mechaniku. Pribudne však niekoľko príkazov, ktoré pracujú s páskou. Tieto príkazy sa vykonávajú pomocou nástroja na prácu s magnetickou páskou <application>mt</application>, ktorý je súčasťou balíka <application>cpio</application>.
|
|
Translated and reviewed by
Peter Mráz
|
|
|
|
Located in
serverguide/C/backups.xml:477(para)
|
|
1961.
|
|
|
Here is the shell script modified to use a tape drive:
|
|
|
|
Tu je upravený shell skript pre páskovú mechaniku:
|
|
Translated and reviewed by
Peter Mráz
|
|
|
|
Located in
serverguide/C/backups.xml:482(para)
|
|
1962.
|
|
|
#!/bin/bash
####################################
#
# Backup to tape drive script.
#
####################################
# What to backup.
backup_files="/home /var/spool/mail /etc /root /boot /opt"
# Where to backup to.
dest="/dev/st0"
# Print start status message.
echo "Backuping up $backup_files to $dest"
date
echo
# Make sure the tape is rewound.
mt -f $dest rewind
# Backup the files using tar.
tar czf $dest $backup_files
# Rewind and eject the tape.
mt -f $dest rewoffl
# Print end status message.
echo
echo "Backup finished"
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)
|
|
|
|
1963.
|
|
|
The default device name for a SCSI tape drive is <filename>/dev/st0</filename>. Use the appropriate device path for your system.
|
|
|
|
Predvolené označenie páskovej mechaniky SCSI je <filename>/dev/st0</filename>. Použite označenie platné pre váš systém.
|
|
Translated and reviewed by
Peter Mráz
|
|
|
|
Located in
serverguide/C/backups.xml:519(para)
|
|
1964.
|
|
|
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>:
|
|
|
|
Údaje z páskovej mechaniky obnovíme rovnako ako keby sme ich obnovovali z bežného archívu. Jednoducho previnieme pásku a použijeme miesto cesty k súboru označenie zariadenia. Ak napríklad chceme obnoviť súbor <filename>/etc/hosts</filename> do <filename>/tmp/etc/hosts</filename>, zadáme:
|
|
Translated and reviewed by
Peter Mráz
|
|
|
|
Located in
serverguide/C/backups.xml:524(para)
|
|
1965.
|
|
|
mt -f /dev/st0 rewind
|
|
|
|
mt -f /dev/st0 rewind
|
|
Translated and reviewed by
Peter Mráz
|
|
|
|
Located in
serverguide/C/backups.xml:529(command)
|