Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
can rsync do this ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
gentoobobby
Apprentice
Apprentice


Joined: 17 Jan 2006
Posts: 293

PostPosted: Wed Feb 08, 2006 1:45 pm    Post subject: can rsync do this ? Reply with quote

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
View user's profile Send private message
drwook
Veteran
Veteran


Joined: 30 Mar 2005
Posts: 1324
Location: London

PostPosted: Wed Feb 08, 2006 7:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
bedo
n00b
n00b


Joined: 11 May 2004
Posts: 56

PostPosted: Thu Feb 16, 2006 12:49 am    Post subject: Reply with quote

use rdiff-backup tools

it uses rsync algorithm and keeps track of all your revisions.
Back to top
View user's profile Send private message
azwr
n00b
n00b


Joined: 06 Aug 2004
Posts: 49

PostPosted: Thu Feb 16, 2006 3:15 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum