|
Rsync example on webpage: msg#00052sysutils.backup.rsnapshot.general
I was trying to implement a 30 day incremental backup system based off of example one on: http://samba.anu.edu.au/rsync/examples.html Here is my code: #!/bin/sh # This script does personal backups to a rsync backup server. You will end up # with a monthly day rotating incremental backup. The incrementals will go # into subdirectories named after the day of the week, and the current # full backup goes into a directory called "current" # tridge@xxxxxxxxxxxxx # directory to backup BDIR=/var/www # excludes file - this contains a wildcard pattern per line of files to exclude EXCLUDES='/var/www/.bash_history' # the name of the backup machine BSERVER=myservername.com ######################################################################## BACKUPDIR=`date +%d` OPTS="--force --ignore-errors --delete-excluded --delete --backup --backup-dir=/$BACKUPDIR -a" export PATH=$PATH:/bin:/usr/bin:/usr/local/bin # the following line clears the last weeks incremental directory [ -d $HOME/emptydir ] || mkdir $HOME/emptydir rsync --delete -a $HOME/emptydir/ $BSERVER:$BACKUPDIR rmdir $HOME/emptydir # now the actual transfer rsync $OPTS $BDIR $BSERVER:current my problem is.. I cannot get it to incremential backup to seperate folders.. right now it does full/incremental to the 'current' folder. Yes, I can change the last line to remove :current and replace it with $BackupDIR.. but then it just does full backups all the time.. Please bare in mind, this is almost the identical code on the website.. So I would think it should work OOB. thanks ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: /bin/cp: erroneous trailing slash?: 00052, Andy Smith |
|---|---|
| Next by Date: | Re: Rsync example on webpage: 00052, David Keegel |
| Previous by Thread: | Rsnapshot Serveri: 00052, Harold Bieber |
| Next by Thread: | Re: Rsync example on webpage: 00052, David Keegel |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |