Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.
CentOS 5.3
subverion 1.4.2

I am using rsync to backup a repository every day at midnight. We have about 30 repositories some small and some large.

I am using crontab to schedule the job that will run the script file.

The script will have to recursively go through each directory:

repos/DEV/
         /repso1
         /repso2
     DOCS/
         /repso3
etc 

On the target machine I want to create a new directory with the date the backup was done.

i.e.

backup/09OCT2010
      /10OCT2010
      /11OCT2010

So far I have been experimenting with this:

rsync -virza --backup --backup-dir=`date +%Y.%m.%d` dev@10.10.10.10:test_repos/* source/backup

However, this will only do a incremental backup of the files changed. However, I want to do a full-back up with a new directory of the date that the backup was run.

Many thanks for any advice,

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

You probably want rsnapshot. It doesn't name the directories by date, but it'll do everything else you're after.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.