my rsnapshot wrapper do-rsnapshots (v0.15 2.1.12) now does the first
rotation only if sync_first is enabled like
rsnapshot sync && rsnapshot hourly
If you want to test or use do-rsnapshots, please send a mail to me.
Here is the do-rsnapshots.txt:
ENGLISH VERSION
do-rsnapshots: intelligent and fully automatic management for
rsnapshot folders daily weekly monthly yearly
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
the GNU General Public License for more details.
INSTALLATION
Copy as root do-rsnapshots to /usr/local/bin/.
In rsnapshot.conf you can use only hourly, daily, weekly, monthly
and yearly (s.u.).
Put into roots Crontab
/usr/bin/do-rsnapshots
in the place of /usr/bin/rsnapshot hourly
or, if sync_first is activated
in the place of /usr/local/bin/rsnapshot sync
&& /usr/local/bin/rsnapshot hourly
and delete the other calls of /usr/bin/rsnapshot (s.u.).
CHANGELOG in do-rsnapshots
REQUIREMENTS:
You have to use only some of the the known interval names hourly,
daily, weekly, monthly and yearly.
Of course the bash has to be installed, also grep and the coreutils
for cat and cut.
KNOWN BUGS
I didn't implement the args in man rsnapshot:
SYNOPSIS
rsnapshot [-vtxqVD] [-c cfgfile] [command] [args]
I use rsnapshot 1.2.9 since 2006, rsnapshot 1.3.1 since 2012 with
Suse Linux at my desktop and are very happy to have it..
Since 2010 I have a laptop with Suse Linux 11.2 use rsnapshot-1.3.1.
Many thanks to the developers.
I have in rsnapshot.conf
interval hourly 8
interval daily 7
interval weekly 4
interval monthly 12
interval yearly 100
because I want to hold on my old data.
In the crontab should be
0 * * * * /usr/bin/rsnapshot hourly (or, if sync_first is
activated, /usr/local/bin/rsnapshot sync
&& /usr/local/bin/rsnapshot hourly)
50 23 * * * /usr/bin/rsnapshot daily
40 23 * * 6 /usr/bin/rsnapshot weekly
30 23 1 * * /usr/bin/rsnapshot monthly
20 23 1 1 * /usr/bin/rsnapshot yearly
Since the laptop is not always running, its very unsure when the
daily weekly monthly and yearly backups are made
If it is not running after 23:00, there is no rsnapshot daily weekly
monthly oder yearly.
Therefore I wrote do-rsnapshots, that calls rsnapshot as needed.
In the crontab now is only
0 * * * * /usr/bin/do-rsnapshots
It calls automatically rsnapshot sync, too, if needed. (I like to
put nice ionice -c3 before, so I will not disturbed when working or
doing whatever.)
0 * * * * nice ionice -c3 /usr/bin/do-rsnapshots
do-rsnapshots first reads the rsnapshot configuration file and then
knows how many updates should be there for each of daily weekly
monthly or yearly.
Then it looks for the last monthly folder. If it exists, it looks
for yearly.0. If that does not exist or is not made in the same
year as the oldest monthly folder, rsnapshot yearly is called with
all options from the command line of do-rsnapshots.
The same is done with monthly weekly and daily.
At last it calls (rsnapshot sync if activated and) rsnapshot hourly
with all options from the command line of do-rsnapshots.
So the backup folders are automatically build and managed.
Since all the actual work is done by rsnapshot, I hope, there are no
new bugs (exception see KNOWN BUGS).
It is also possible, to do different things.
If you want to have one daily update at four o'clock for a whole
year (huh
rsnapshot.conf
interval daily 366
interval yearly 100
it all goes automatically with
0 4 * * * /usr/bin/do-rsnapshots
in crontab. But I didn't test that.
do-rsnapshots now runs without any bugs since August 2010 on a Suse
Linux 10.1 with rsnapshot 1.2.9/1.3.1 and a Suse Linux 11.2 with
rsnapshot 1.3.1.
Only when I activated sync_first and link_dest with rsnapshot 1.2.9,
not all the files in .sync/hourly.0 were hardlinked to hourly.1,
but rsnapshot 1.3.1 solved that.
If you have any bug reports or suggestions, please send mail to
rolf.muth < at > web.de
With kind regards!
Rolf Muth, 01/05/2012
--
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
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
