View previous topic :: View next topic |
Author |
Message |
gentoobobby Apprentice
Joined: 17 Jan 2006 Posts: 293
|
Posted: Wed Feb 08, 2006 1:45 pm Post subject: can rsync do this ? |
|
|
What i am trying to do is create a backup
what m trying to achive is a daily backup that backups the last 10 days of work.
Day 1 backups /home and stores in folder day 1
Day 2 backups /home and stores in folder day 2
Day 10 backups /home and stores in folder day 10
so day a 11 will be goin back over day 1
but i came across a problem where if there was 31st day of the month it would go back over day 1 so i need to create another backup folder called 11 which can back up the 31st day of each month is this possible.
Have i made this clear enough to understand . |
|
Back to top |
|
|
drwook Veteran
Joined: 30 Mar 2005 Posts: 1324 Location: London
|
Posted: Wed Feb 08, 2006 7:28 pm Post subject: |
|
|
daily cron job for a script that creates a directory named by date and copies the data over, then checks if one for (date-10) exists and delete that if it does? |
|
Back to top |
|
|
bedo n00b
Joined: 11 May 2004 Posts: 56
|
Posted: Thu Feb 16, 2006 12:49 am Post subject: |
|
|
use rdiff-backup tools
it uses rsync algorithm and keeps track of all your revisions. |
|
Back to top |
|
|
azwr n00b
Joined: 06 Aug 2004 Posts: 49
|
Posted: Thu Feb 16, 2006 3:15 am Post subject: |
|
|
just have your 10 days worth of folders and do something like this inside of a script:
Code: |
rm -R backupHome10/
mv -R backupHome9/ backupHome10/
mv -R backupHome8/ backupHome9
(...etc)
rsync -(whatever flags you use) /home/user backupHome1
|
i'm sure you could do something with a script to simplify it (with a for loop or the like), but this was a fast and dirty way that might trigger some better solution. |
|
Back to top |
|
|
|