SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
do-rsnapshot: very interesting!!
Author Message
Post do-rsnapshot: very interesting!! 
Hi all,

I was looking at the problem of using rsnapshot at home, and the problem is that the computer doesn't run all the time... It seems "home computing" is not covered by rsnapshot, I have seen nothing on the website.

Then, I just see this do-rsnapshot script which could solve my problem. So, I am very curious to test it and give feeback.

Though, I would like to know if there are any plans to integrate that kind of functionalities directly in rsnapshot, that would be great I think.

Post do-rsnapshot: very interesting!! 
Am Freitag, 26. August 2011, 15:25:52 schrieb Gilles Martin:
Hi all,

I was looking at the problem of using rsnapshot at home, and the problem is
that the computer doesn't run all the time... It seems "home computing" is
not covered by rsnapshot, I have seen nothing on the website.

Then, I just see this do-rsnapshot script which could solve my problem. So,
I am very curious to test it and give feeback.

Though, I would like to know if there are any plans to integrate that kind
of functionalities directly in rsnapshot, that would be great I think.

Hi Gilles,

I did not look at the do-snapshot script, but it looks like its "home
computing" functionality is covered by anacron and its /etc/cron.(hourly,
daily, weekly, monthly) scripts. It should be a standard part of your
distribution.

After thinking about the concept of anacron (and my setup) as detailed below,
you might conclude you don't need do-snapshot.

This is a typical /etc/crontab from Gentoo:
# check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly
59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly
9 3 * * * root rm -f /var/spool/cron/lastrun/cron.daily
19 4 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly
29 5 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly
*/10 * * * * root test -x /usr/sbin/run-crons && /usr/sbin/run-crons

The first 4 lines remove lock files when they are outdated. This covers
machines continuously running. The last line regulary checks for date of lock
files, if outdated executes all of the scripts in /etc/cron.xxx (including an
added rsnapshot script) and updates the lock file. This covers the home use
case when a anacron daily, weekly etc. command is due during power off. The
scripts are then executed in alphabetical order during the first 10 minutes
after the next boot.

HTH,

Johannes Nieß

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post do-rsnapshot: very interesting!! 
Hi Johannes

After thinking about the concept of anacron (and my setup) as detailed below,
you might conclude you don't need do-snapshot.

This is a typical /etc/crontab from Gentoo:
# check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly
59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly
9 3 * * * root rm -f /var/spool/cron/lastrun/cron.daily
19 4 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly
29 5 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly
*/10 * * * * root test -x /usr/sbin/run-crons && /usr/sbin/run-crons

Non-anacron crons also sport this set-up. After using this for a while,
I found some (minor) issues.

The standard rsnapshot crontab makes sure, that the jobs run in
proper sequence. Slowest rotation first, actual snapshot last. With
/etc/cron.xxx jobs, the sequence is basically random. So occasionally
you delete snapshots which should have moved to a slower rotation.

And, of course, this only works if you stick to the standard intervals of
hourly, daily, weekly. monthly. E.g. neither my Slackware nor my Suse
boxes offer a yearly interval. Yeah, you could tweak the run-parts,
run-crons whatever system script...

Not to forget that getting the jobs set-up right seems to be the FAQ #1.
For these reasons I also would like to see a feature in stock rsnapshot
like in my patch here:
http://sourceforge.net/mailarchive/message.php?msg_id=27739440


HTH,
Peter Klausner



___________________________________________________________
Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die
Toolbar eingebaut! http://produkte.web.de/go/toolbar

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post do-rsnapshot: very interesting!! 
2011/8/26 Peter Klausner <pklausner < at > users.sourceforge.net>:
hourly, daily, weekly. monthly. E.g. neither my Slackware nor my Suse
boxes offer a yearly interval. Yeah, you could tweak the run-parts,

OpenSUSE 11.4 switched to cronie, which has a < at > yearly directive.

man 5 crontab Smile

Best
Martin

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post do-rsnapshot: very interesting!! 
I do this by running a script on the serverthat tries to ping the target
machine before backing it up
its here if its any use
http://www.medalto.co.uk/?q=node/3



On 27/08/11 20:51, Chris Dennis wrote:
On 08/26/2011 02:25 PM, Gilles Martin wrote:
Hi all,

I was looking at the problem of using rsnapshot at home, and the problem
is that the computer doesn't run all the time... It seems "home
computing" is not covered by rsnapshot, I have seen nothing on the website.

Then, I just see this do-rsnapshot script which could solve my problem.
So, I am very curious to test it and give feeback.
Brandysnap (https://github.com/StarsoftAnalysis/brandysnap) is
specifically designed for situations where backup jobs don't always run
at the ideal time. Like rsnapshot, it's a Perl script that runs rsync.

I should point out that Brandysnap is still being developed though -- it
works, but there are some details yet to be finished.

cheers

Chris

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post do-rsnapshot: very interesting!! 
On Fri, 2011-08-26 at 19:45 +0200, Johannes Niess wrote:
I did not look at the do-snapshot script, but it looks like its "home
computing" functionality is covered by anacron and its /etc/cron.(hourly,
daily, weekly, monthly) scripts. It should be a standard part of your
distribution.
On Fedora, and (I suspect) many distros intended for home use, timed events are run not by cron, but by anacron, which is invoked as 'anacron -s". This causes the jobs in /etc/anacrontab to be run sequentially, so that their executions never overlap.

FYI: The man page for anacron is a little confusing about the order in which jobs are run. When "anacron -s" is invoked, anacron waits (as always) for delay minutes from its (anacron's) invocation before running a particular job, also waiting till all other jobs are complete.

On my own system, I have edited /etc/crontab to read:
# /etc/anacrontab: configuration file for anacron

# See anacron(Cool and anacrontab(5) for details.

SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
# the maximal random delay added to the base delay of the jobs
RANDOM_DELAY=45
# the jobs will be started during the following hours only
START_HOURS_RANGE=3-22

#period in days delay in minutes job-identifier command
#these 3 commands are in the Fedora distro
< at > daily 5 cron.daily nice run-parts /etc/cron.daily
< at > weekly 15 cron.weekly nice run-parts /etc/cron.weekly
< at > monthly 25 cron.monthly nice run-parts /etc/cron.monthly

#these 3 commands added by Jon 06-Aug-2011
< at > monthly 35 snap.monthly nice /usr/bin/rsnapshot monthly
< at > weekly 45 snap.weekly nice /usr/bin/rsnapshot weekly
< at > daily 55 snap.daily nice /usr/bin/rsnapshot sync; nice /usr/bin/rsnapshot daily
The last 3 lines cause rsnapshot to be run in the appropriate order after the other functions, which are set up in the distro. So far, it seems to be working OK.

jon

Post do-rsnapshot: very interesting!! 
Hallo Jonathan Ryshpan,

Am Sonntag, 28. August 2011 00:11 schrieb Jonathan Ryshpan:
On Fri, 2011-08-26 at 19:45 +0200, Johannes Niess wrote:
I did not look at the do-snapshot script, but it looks like its "home
computing" functionality
What does that mean?

is covered by anacron and
its /etc/cron.(hourly,

Yes, it works. I tested that after I wrote do-rsnapshots.
But do-snapshots much easier to config, because you only have to (config
rsnapshot.conf and) put do-rsnapshots into your crontab once (!) to replace
"rsnapshot sync" or "rsnapshot hourly" or whatever your first backup is.

The rest is automatic.

do-rsnapshots looks into the rsnapshot.conf and the backup and runs first
every needed "rsnapshot yearly", "rsnapshot monthly", "rsnapshot weekly",
"rsnapshot daily", "rsnapshot hourly" and then "rsnapshot sync", if that is
activated.

You dont need anacron.

daily, weekly, monthly) scripts. It should be a standard part of your
distribution.

On Fedora, and (I suspect) many distros intended for home use, timed
events are run not by cron, but by anacron, which is invoked as
'anacron -s". This causes the jobs in /etc/anacrontab to be run
sequentially, so that their executions never overlap.

FYI: The man page for anacron is a little confusing about the order in
which jobs are run. When "anacron -s" is invoked, anacron waits (as
always) for delay minutes from its (anacron's) invocation before running
a particular job, also waiting till all other jobs are complete.

On my own system, I have edited /etc/crontab to read:

# /etc/anacrontab: configuration file for anacron

# See anacron(Cool and anacrontab(5) for details.

SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
# the maximal random delay added to the base delay of the jobs
RANDOM_DELAY=45
# the jobs will be started during the following hours only
START_HOURS_RANGE=3-22

#period in days delay in minutes job-identifier command
#these 3 commands are in the Fedora distro
< at > daily 5 cron.daily nice run-parts /etc/cron.daily
< at > weekly 15 cron.weekly nice run-parts /etc/cron.weekly
< at > monthly 25 cron.monthly nice run-parts /etc/cron.monthly

#these 3 commands added by Jon 06-Aug-2011
< at > monthly 35 snap.monthly nice /usr/bin/rsnapshot monthly
< at > weekly 45 snap.weekly nice /usr/bin/rsnapshot weekly
< at > daily 55 snap.daily nice /usr/bin/rsnapshot sync;
nice /usr/bin/rsnapshot daily

The last 3 lines cause rsnapshot to be run in the appropriate order
after the other functions, which are set up in the distro. So far, it
seems to be working OK.

--
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
Analoge Uhr (clock): http://www.heise.de/software/download/analoge_uhr/61872

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post do-rsnapshot: very interesting!! 
Hallo, Peter,

Du meintest am 26.08.11:

This is a typical /etc/crontab from Gentoo:

[run-parts]

And, of course, this only works if you stick to the standard
intervals of hourly, daily, weekly. monthly. E.g. neither my
Slackware nor my Suse boxes offer a yearly interval. Yeah, you could
tweak the run-parts, run-crons whatever system script...

But where's the big problem? I use the old-fashioned "/etc/crontab" with
Vixie's "cron", and I've added an entry

20 0 1 1 * root run-parts /etc/cron.yearly

And I copied the wrapper script which invokes "rsnapshot yearly" from
the similar script for "rsnapshot weekly" - there are several ways.

Ok - of course I have added the interval "yearly" in "/etc/
rsnapshot.conf".

And it works well, since more than 5 years.

--------------------------------

And I've added a similar entry in "/etc/anacrontab" - maybe my machine
isn't awake on turn of the year. It's a nearly complete copy of the
entry for "weekly".

Viele Gruesse!
Helmut

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

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