Archiving deleted files instead of deleting them

Dorlomin nash at ctleng.com
Wed Sep 13 18:15:10 GMT 2006


I use the backup option all the time.  I have a script setup to put all the
files in a datestamped folder so I can find anything accidently changed or
deleted.

here is part of the script

# Set date to to variable.
TODAY=( `date +%y_%B_%d` )

# Set Options
OPTS="-v -u -a --rsh=ssh --progress --delete --stats -b
--backup-dir=/archive/deleted/$TODAY"

# Rsync Statement
rsync $OPTS root at server:/home/* /backup/home/
if [ $? != 0 ]; then
echo 'Failed'
fi

exit 0

I backup from multiple locations through the internet, and this is a small
snip of one of my backup cron jobs.

Steve


feenster wrote:
> 
> Christoph,
> 
> Thanks for the reply. I did find your post, but it didn't appear to be the
> same thing I was wanting.
> 
> What I want to achieve is 2 folders on my backup server. 1 folder is a
> "Live" folder - it is an exact copy of the data I am backing up, deletions
> and all. The second folder is an "Archive" - this is not date stamped
> snapshots, but would basically contain any file that Rsync was instructed
> to delete at any point in the past.
> 
> Can the --backup option do that? If so, could you explain how your setup
> works now?
> 
> Cheers,   
>     Matt
> 

-- 
View this message in context: http://www.nabble.com/Archiving-deleted-files-instead-of-deleting-them-tf2206865.html#a6291295
Sent from the Samba - rsync forum at Nabble.com.



More information about the rsync mailing list