hi guys,

i found a rsync backup script that will perform a 7 day incremental backup
of the /home directory but the example is based on a remote server,. my
scenario is that the /home directory will be backed up using an external
hard drive attached to the local machine. i already formatted this drive and
named the partition /backup, however i did not auto mount it using fstab, is
it advisable to auto mount it? the following is the copy of the script i
found and as you can see i already made some editing but i don't know if it
will work or not, particularly on the rsync portion, i'm not much of a
programmer. thanks in advance.

#!/bin/sh
BDIR=/home
# Remote directory on backup server
BACKUP_HOME=/backup
# the name of the backup server
BACKUPDIR=`date +%A`
OPTS="--force --ignore-errors --delete --backup
-backup-dir=$BACKUP_HOME/$BACKUPDIR -av"
export PATH=$PATH:/bin:/usr/bin:/usr/local/bin
# Dump output to backup file
date > /var/log/backup.$BACKUPDIR.log
# the following line clears the last week's incremental directory
[ -d /tmp/emptydir ] || mkdir /tmp/emptydir
rsync --delete -a /tmp/emptydir/
[EMAIL PROTECTED]:$BACKUP_HOME/$BACKUPDIR/
rmdir /tmp/emptydir
# now the actual transfer
rsync $OPTS $BDIR [EMAIL PROTECTED]:$BACKUP_HOME/current >>
/var/log/backup.$BACKUPDIR.log
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph

Reply via email to