SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
My solution to fully automated backups with irregular interv
Author Message
Post My solution to fully automated backups with irregular interv 
Hello rsnashot users,

I've been using rsnapshot for qiute a long already and I liked its simple and straightforward way of making the backups. But there were two thing which I was missing from it:
- backups with irregular or random intervals. sometimes I need to take 3 backups in a row with 5 minutes interval, and other times I only need this backup once a month.
- missed backups. what should I do if I missed monthly and only notice it a week ago, the rotation gets a bit messed up.
And eventually I wrote a script which resolves these two issues and which became an ultimate solution for me.

Link to the script: _https://non7top.googlecode.com/svn/trunk/scripts/rsnapshot/rsnapshot_ii

How it works.
Ths script operation is based only on run count, the dates in crontab or interval length make no difference. It doesn't matter how often or seldom you run the script. Interval names also make no difference. All next level rotations are performed automagically.

Example.
Say you have following intervals in your config:
interval        weekly  8
interval        monthly 6
interval        yearly  4

And this entry in crontab:
15 05 * * 6             /usr/local/bin/rsnapshot_ii /etc/rsnapshot.conf

When invoked the script will run rsnapshot weekly 8 times in a row. On 8th run it will run rsnapshot monthly so that very first weekly will become first monthly, the counter will be reset at this point and next eight runs will be weekly again, on 16th run second monthly will be executed and so on. First yearly will be run after 8*6 runs of the script.
The number in interval specifications becomes more "after how many runs next level will be executed" rather then "how many backups to store for this interval"
Run count is stored in file $snapshot_root/.$interval.count

Usage:
the script expects full path to a config file as first parameter. Config is supposed to have interval and snapshot_root specification, also sync_first 1 is required.

--
С уважением Владимир В. Бережной

Post My solution to fully automated backups with irregular interv 
Hallo Владимир Бережной,

Am Dienstag, 7. Februar 2012 01:10 schrieb Владимир Бережной:
Hello rsnashot users,

I've been using rsnapshot for qiute a long already and I liked
its simple and straightforward way of making the backups. But
there were two thing which I was missing from it:
- backups with irregular or random intervals. sometimes I need to
take 3 backups in a row with 5 minutes interval, and other times
I only need this backup once a month.
- missed backups. what should I do if I missed monthly and only
notice it a week ago, the rotation gets a bit messed up.
And eventually I wrote a script which resolves these two issues
and which became an ultimate solution for me.

Link to the script: _

https://non7top.googlecode.com/svn/trunk/scripts/rsnapshot/rsnapshot_ii

You could use my do-rsnapshots also, it's on the list:
Am Sonntag, 8. Januar 2012 22:55 schrieb Rolf Muth:
Re: [rsnapshot-discuss] do-rsnapshots 0.16

--
Herzliche Grüße!
Rolf Muth
Meine Adressen duerfen nicht fuer Werbung verwendet werden!
PGP Public Key:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xF8DC41935544C89A
fingerprint: C025 3071 8E56 F8F1 250A 5624 F8DC 4193 5544 C89A

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post My solution to fully automated backups with irregular interv 
On Tue, Feb 7, 2012 at 15:19, Rolf Muth <rolf.muth < at > web.de ([email]rolf.muth < at > web.de[/email])> wrote:
You could use my do-rsnapshots also, it's on the list:
Am Sonntag, 8. Januar 2012 22:55 schrieb Rolf Muth:
Re: [rsnapshot-discuss] do-rsnapshots 0.16


Yes, I saw that one. But description of do-rsnapshots says it heavily relies on specific interval names and performs some date calculations, so I thought it will not work for me, since I needed the script to be independent from time and date. Now after a more closer look at the code it seems that it achieves mostly the same goal as my script and may even be more reliable and universal since my one relies on presence of additional files with run count. On the other hand my script is a bit shorter and easier to read (well, at least for me german is quite hard), and the logic is also a bit simplier.

Display posts from previous:
Reply to topic Page 1 of 1
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
  


Magic SEO URL for phpBB