|
4753.
|
|
|
#!/bin/bash
####################################
#
# 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 "Backing 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.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/backups.xml:38(programlisting)
|
|
4754.
|
|
|
<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> una variable que indica qué directorios le gustaría copiar. La lista debería personalizarse para adaptarse a sus necesidades.
|
|
Translated by
Paco Molinero
|
|
|
|
Located in
serverguide/C/backups.xml:75(para)
|
|
4755.
|
|
|
<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 using the <application>date</application> utility.
|
|
|
|
<emphasis>$day:</emphasis> una variable que guarda el día de la semana (Monday, Tuesday, Wednesday, etc). Esto se usa para crear un archivador para cada día de la semana, lo que produce un historial de copias de siete días. Hay otras formas de conseguir esto, incluyendo otras formas de usar la utilidad <application>date</application>.
|
|
Translated by
Paco Molinero
|
|
|
|
Located in
serverguide/C/backups.xml:81(para)
|
|
4756.
|
|
|
<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> variable que contiene el nombre <emphasis>corto</emphasis> del sistema. Usar el nombre del sistema en el nombre del archivo le permite colocar archivos diarios de varios sistemas en el mismo directorio.
|
|
Translated by
Paco Molinero
|
|
|
|
Located in
serverguide/C/backups.xml:88(para)
|
|
4757.
|
|
|
<emphasis>$archive_file:</emphasis> the full archive filename.
|
|
|
|
<emphasis>$archive_file:</emphasis> el nombre completo del archivador.
|
|
Translated by
Paco Molinero
|
|
|
|
Located in
serverguide/C/backups.xml:95(para)
|
|
4758.
|
|
|
<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 of using <emphasis>NFS</emphasis>.
|
|
|
|
<emphasis>$dest:</emphasis> destino del archivo. La carpeta necesita ser creada y, en este caso, estar <emphasis>montada</emphasis> antes de ejecutar el <emphasis>script</emphasis> de backup. Vea <xref linkend="network-file-system"/> para los detalles sobre cómo usar <emphasis>NFS</emphasis>.
|
|
Translated by
Paco Molinero
|
|
|
|
Located in
serverguide/C/backups.xml:100(para)
|
|
4759.
|
|
|
<emphasis>status messages:</emphasis> optional messages printed to the console using the <application>echo</application> utility.
|
|
|
|
<emphasis>mensajes de estado:</emphasis> mensajes opcionales mostrados en la consola usando la utilidad <application>echo</application>.
|
|
Translated by
Paco Molinero
|
|
|
|
Located in
serverguide/C/backups.xml:107(para)
|
|
4760.
|
|
|
<emphasis>tar czf $dest/$archive_file $backup_files:</emphasis> the <application>tar</application> command used to create the archive file.
|
|
|
|
<emphasis>tar czf $dest/$archivador $archivos_backup:</emphasis> el comando <application>tar</application> usado para crear el archivador.
|
|
Translated by
Paco Molinero
|
|
|
|
Located in
serverguide/C/backups.xml:113(para)
|
|
4761.
|
|
|
<emphasis>c:</emphasis> creates an archive.
|
|
|
|
<emphasis>c:</emphasis> crea un archivo.
|
|
Translated by
Paco Molinero
|
|
|
|
Located in
serverguide/C/backups.xml:119(para)
|
|
4762.
|
|
|
<emphasis>z:</emphasis> filter the archive through the <application>gzip</application> utility compressing the archive.
|
|
|
|
<emphasis>z:</emphasis> filtra en archivo a través de la utilidad <application>gzip</application> comprimiendo el archivo.
|
|
Translated by
Paco Molinero
|
|
|
|
Located in
serverguide/C/backups.xml:124(para)
|