|
1888.
|
|
|
#!/bin/sh
####################################
#
# Backup to NFS mount script.
#
####################################
# What to backup.
backup_files="/home /var/spool/mail /etc /root /boot /opt"
# Where to backup to.
dest="/mnt/backup"
# Create archive filename.
day=$(date +%A)
hostname=$(hostname -s)
archive_file="$hostname-$day.tgz"
# Print start status message.
echo "Backuping up $backup_files to $dest/$archive_file"
date
echo
# Backup the files using tar.
tar czf $dest/$archive_file $backup_files
# Print end status message.
echo
echo "Backup finished"
date
# Long listing of files in $dest to check file sizes.
ls -lh $dest
|
|
|
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.
|
|
|
|
#!/bin/sh
####################################
#
# Script para backup em um ponto de montagem NFS.
#
####################################
# O que incluir no backup.
backup_files="/home /var/spool/mail /etc /root /boot /opt"
# Onde armazenar o backup.
dest="/mnt/backup"
# Criando o nome do arquivo.
day=$(date +%A)
hostname=$(hostname -s)
archive_file="$hostname-$day.tgz"
# Imprime mensagem de status inicial.
echo "Backuping up $backup_files to $dest/$archive_file"
date
echo
# cria o arquivo de backup usando tar.
tar czf $dest/$archive_file $backup_files
# Imprime mensagem de status final.
echo
echo "Backup finished"
date
# Listagem completa do diretório $dest para checar tamanho dos arquivos.
ls -lh $dest
|
|
Translated by
luiz.mineo
|
|
Reviewed by
Laudeci Oliveira
|
|
|
|
1889.
|
|
|
<emphasis>$backup_files:</emphasis> a variable listing which directories you would like to backup. The list should be customized to fit your needs.
|
|
|
|
<emphasis>$backup_files:</emphasis> uma lista variável de quais diretórios você gostaria de incluir no backup. Ela deve ser alterada para atender as suas necessidades.
|
|
Translated and reviewed by
Laudeci Oliveira
|
|
|
|
Located in
serverguide/C/backups.xml:77(para)
|
|
1890.
|
|
|
<emphasis>$day:</emphasis> a variable holding the day of the week (Monday, Tuesday, Wednesday, etc). This is used to create an archive file for each day of the week, giving a backup history of seven days. There are other ways to accomplish this including other ways using the <application>date</application> utility.
|
|
|
|
<emphasis>$day:</emphasis> uma variável que armazena o dia da semana (Segunda, Terça, Quarta, etc). Ela é usada para criar um arquivo para cada dia da semana, criando assim um histórico de backups de sete dias. Existem outras formas de se fazer isso, incluindo algumas maneiras que fazem uso do comando <application>date</application>.
|
|
Translated by
luiz.mineo
|
|
Reviewed by
Laudeci Oliveira
|
|
|
|
Located in
serverguide/C/backups.xml:83(para)
|
|
1891.
|
|
|
<emphasis>$hostname:</emphasis> variable containing the <emphasis>short</emphasis> hostname of the system. Using the hostname in the archive filename gives you the option of placing daily archive files from multiple systems in the same directory.
|
|
|
|
<emphasis>$hostname:</emphasis> variável que contém o nome da máquina <emphasis>simplificado</emphasis> do sistema. Usando o nome da máquina no nome do arquivo te dá a possibilidade de armazenar backups diários de múltiplos sistemas em um mesmo diretório.
|
|
Translated and reviewed by
Laudeci Oliveira
|
|
|
|
Located in
serverguide/C/backups.xml:90(para)
|
|
1892.
|
|
|
<emphasis>$archive_file:</emphasis> the full archive filename.
|
|
|
|
<emphasis>$archive_file:</emphasis> o nome completo do arquivo.
|
|
Translated by
luiz.mineo
|
|
Reviewed by
Laudeci Oliveira
|
|
|
|
Located in
serverguide/C/backups.xml:97(para)
|
|
1893.
|
|
|
<emphasis>$dest:</emphasis> destination of the archive file. The directory needs to be created and in this case <emphasis>mounted</emphasis> before executing the backup script. See <xref linkend="network-file-system"/> for details using <emphasis>NFS</emphasis>.
|
|
|
|
<emphasis>$dest:</emphasis> destino do arquivo. O diretório de destino precisa ser criado, e neste caso <emphasis>montado</emphasis> antes do script de backup ser executado. Veja <xref linkend="network-file-system"/> detalhes de como usar o <emphasis>NFS</emphasis>.
|
|
Translated and reviewed by
Laudeci Oliveira
|
|
|
|
Located in
serverguide/C/backups.xml:102(para)
|
|
1894.
|
|
|
<emphasis>status messages:</emphasis> optional messages printed to the console using the <application>echo</application> utility.
|
|
|
|
<emphasis>status messages:</emphasis> mensagens opcionais impressa no console usando o comando <application>echo</application>.
|
|
Translated and reviewed by
Laudeci Oliveira
|
|
|
|
Located in
serverguide/C/backups.xml:109(para)
|
|
1895.
|
|
|
<emphasis>tar czf $dest/$archive_file $backup_files:</emphasis> the <application>tar</application> command used to create the archive file.
|
|
|
|
<emphasis>tar czf $dest/$archive_file $backup_files:</emphasis> o comando <application>tar</application> usado para criar o arquivo.
|
|
Translated by
luiz.mineo
|
|
Reviewed by
Laudeci Oliveira
|
|
|
|
Located in
serverguide/C/backups.xml:115(para)
|
|
1896.
|
|
|
<emphasis>c:</emphasis> creates an archive.
|
|
|
|
<emphasis>c:</emphasis> cria um arquivo
|
|
Translated by
luiz.mineo
|
|
Reviewed by
Laudeci Oliveira
|
|
|
|
Located in
serverguide/C/backups.xml:121(para)
|
|
1897.
|
|
|
<emphasis>z:</emphasis> filter the archive through the <application>gzip</application> utility compressing the archive.
|
|
|
|
<emphasis>z:</emphasis> comprime o arquivo usando o utilitário <application>gzip</application>.
|
|
Translated and reviewed by
Laudeci Oliveira
|
|
|
|
Located in
serverguide/C/backups.xml:126(para)
|