SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
rsnapshot multiple hosts
Author Message
Post rsnapshot multiple hosts 
I appreciate your suggestions, this will make my rsnapshot configuration
smaller and easier to read.
The rsnapshot is still not working the way I expect though. To test this
I placed a file in /home/username, the next day I checked the daily.0
backup set for that same file and it was not in the directory.
I will post some log data and my rsnapshot configuration.
Any ideas you have would be most appreciated.
Rsnapshot configuration
config_version 1.2
snapshot_root /.private/.snapshots/
#
#no_create_root 1
cmd_cp /bin/cp
cmd_rm /bin/rm
cmd_rsync /usr/bin/rsync
cmd_ssh /usr/bin/ssh
cmd_logger /usr/bin/logger
cmd_du /usr/bin/du
cmd_rsnapshot_diff /usr/bin/rsnapshot-diff
interval daily 7
interval weekly 4
interval monthly 6
# GLOBAL OPTIONS #
verbose 4
loglevel 4
logfile /var/log/rsnapshot.log
lockfile /var/run/rsnapshot.pid
#rsync_short_args -a
#rsync_long_args --delete --numeric-ids --relative --delete-excluded
du_args -csh
one_fs 1
backup root < at > 123.456.789.123:/ /home/ /etc/ /usr/ /data/
/var/lib/samba/ server/
backup root < at > 111.222.333.444:/ /var/ /etc/ /usr/ /home/ server2/

a log file
[09/Jun/2007:00:00:04] /usr/bin/rsync -avx --delete --numeric-ids
--relative --delete-excluded --rsh=/usr/bin/ssh root < at > 123.456.789.123:/
/home/ /etc/ /usr/ /data/ /var/lib/samba
/.private/.snapshots/daily.0/server/
[09/Jun/2007:01:24:24] /usr/bin/rsync -avx --delete --numeric-ids
--relative --delete-excluded --rsh=/usr/bin/ssh root < at > 111.222.333.444:/
/var/ /etc/ /usr/ /home /.private/.snapshots/daily.0/server2/
[09/Jun/2007:23:59:01] /usr/bin/rsnapshot daily: started
[09/Jun/2007:23:59:01] Setting locale to POSIX "C"
[09/Jun/2007:23:59:01] Removing stale lockfile /var/run/rsnapshot.pid
[09/Jun/2007:23:59:01] /usr/bin/logger -i -p user.err -t rsnapshot
WARNING: Removing stale lockfile /var/run/rsnapshot.pid
[09/Jun/2007:23:59:01] rm -f /var/run/rsnapshot.pid
[09/Jun/2007:23:59:01] echo 20287 > /var/run/rsnapshot.pid
[09/Jun/2007:23:59:01] /bin/rm -rf /.private/.snapshots/daily.6/
[10/Jun/2007:00:00:00] mv /.private/.snapshots/daily.5/
/.private/.snapshots/daily.6/
[10/Jun/2007:00:00:00] mv /.private/.snapshots/daily.4/
/.private/.snapshots/daily.5/
[10/Jun/2007:00:00:00] mv /.private/.snapshots/daily.3/
/.private/.snapshots/daily.4/
[10/Jun/2007:00:00:00] mv /.private/.snapshots/daily.2/
/.private/.snapshots/daily.3/
[10/Jun/2007:00:00:00] mv /.private/.snapshots/daily.1/
/.private/.snapshots/daily.2/
[10/Jun/2007:00:00:00] /bin/cp -al /.private/.snapshots/daily.0
/.private/.snapshots/daily.1
[10/Jun/2007:00:01:06] /usr/bin/rsync -avx --delete --numeric-ids
--relative --delete-excluded --rsh=/usr/bin/ssh root < at > 123.456.789.123:/
/home/ /etc/ /usr/ /data/ /var/lib/samba
/.private/.snapshots/daily.0/server/
[10/Jun/2007:00:01:47] /usr/bin/rsync -avx --delete --numeric-ids
--relative --delete-excluded --rsh=/usr/bin/ssh root < at > 111.222.333.444:/
/var/ /etc/ /usr/ /home /.private/.snapshots/daily.0/server2/
[10/Jun/2007:01:59:01] /usr/bin/rsnapshot weekly: started
[10/Jun/2007:01:59:01] Setting locale to POSIX "C"
[10/Jun/2007:01:59:01] Removing stale lockfile /var/run/rsnapshot.pid
[10/Jun/2007:01:59:01] /usr/bin/logger -i -p user.err -t rsnapshot
WARNING: Removing stale lockfile /var/run/rsnapshot.pid
[10/Jun/2007:01:59:01] rm -f /var/run/rsnapshot.pid
[10/Jun/2007:01:59:01] echo 20302 > /var/run/rsnapshot.pid
[10/Jun/2007:01:59:01] /bin/rm -rf /.private/.snapshots/weekly.3/
[10/Jun/2007:01:59:29] mv /.private/.snapshots/weekly.2/
/.private/.snapshots/weekly.3/
[10/Jun/2007:01:59:29] mv /.private/.snapshots/weekly.1/
/.private/.snapshots/weekly.2/
[10/Jun/2007:01:59:29] mv /.private/.snapshots/weekly.0/
/.private/.snapshots/weekly.1/
[10/Jun/2007:01:59:29] mv /.private/.snapshots/daily.6/
/.private/.snapshots/weekly.0/
[10/Jun/2007:01:59:29] rm -f /var/run/rsnapshot.pid
[10/Jun/2007:01:59:29] /usr/bin/logger -i -p user.err -t rsnapshot
WARNING: /usr/bin/rsnapshot weekly: completed, but with some warnings
[10/Jun/2007:01:59:29] WARNING: /usr/bin/rsnapshot weekly: completed, but
with some warnings
[10/Jun/2007:23:59:01] /usr/bin/rsnapshot daily: started
[10/Jun/2007:23:59:01] Setting locale to POSIX "C"
[10/Jun/2007:23:59:01] echo 20556 > /var/run/rsnapshot.pid
[10/Jun/2007:23:59:01] mv /.private/.snapshots/daily.5/
/.private/.snapshots/daily.6/
[10/Jun/2007:23:59:01] mv /.private/.snapshots/daily.4/
/.private/.snapshots/daily.5/
[10/Jun/2007:23:59:01] mv /.private/.snapshots/daily.3/
/.private/.snapshots/daily.4/
[10/Jun/2007:23:59:01] mv /.private/.snapshots/daily.2/
/.private/.snapshots/daily.3/
[10/Jun/2007:23:59:01] mv /.private/.snapshots/daily.1/
/.private/.snapshots/daily.2/
[10/Jun/2007:23:59:01] /bin/cp -al /.private/.snapshots/daily.0
/.private/.snapshots/daily.1
[10/Jun/2007:23:59:58] /usr/bin/rsync -avx --delete --numeric-ids
--relative --delete-excluded --rsh=/usr/bin/ssh root < at > 123.456.789.123:/
/home/ /etc/ /usr/ /data/ /var/lib/samba
/.private/.snapshots/daily.0/server/
[11/Jun/2007:00:00:13] /usr/bin/rsync -avx --delete --numeric-ids
--relative --delete-excluded --rsh=/usr/bin/ssh root < at > 111.222.333.444:/
/var/ /etc/ /usr/ /home /.private/.snapshots/daily.0/server2/


On Fri, June 8, 2007 11:13 am, gromeck said:
Jack Mendez wrote:
using rsnapshot 1.3.0 multiple hosts is not working.
i have rsnapshot configured to backup from multiple hosts and it only
does
the first machine in the list
i can log in toboth machines using the ssh system in the same way that
rsync does, and all seems well.
here is the backup points list
backup root < at > 123.456.789.123:/home/ server/home/
backup root < at > 123.456.789.123:/data/ server/data/
backup root < at > 123.456.789.123:/etc/ server/etc/
backup root < at > 123.456.789.123:/var/lib/samba/ server/var/lib/samba/
backup root < at > 222.333.444.555:/home/ server2/home/
backup root < at > 222.333.444.555:/usr/ server2/usr/
backup root < at > 222.333.444.555:/etc/ server2/etc/
the 123.456.789.123 backup works fine.
the rest fail.

What are the error messages?


ideas?

I also use 1.3.0 and my config looks like this:

backup root < at > server1:/ /boot/ /var/ /srv/ server1/
backup root < at > server2:/ /boot/ /home/ server2/
backup root < at > server3:/ /boot/ server3/

This will backup each server with a single rsync session!


NOTE: use tabs between all entries, except between the backup
source path (/ /boot/ /var/ /srv/) -- use blanks instead!


NOTE2: this will not work for local backup like this:

backup / /boot /srv /home serverX



I also use the option one_fs=1 (looks like it would be right
for you, too).

gromeck




-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post rsnapshot multiple hosts 
On Fri, Jun 15, 2007 at 10:01:31AM -0400, Jack Mendez wrote:

after moving the previous backups to another directory and letting the
snapshot do its thing, i discovered that the second host in the backup
list is not even being done.
so in the log it lists the rsync to the second host but no rsync actually
happens, ideas?

It looks like rsync is dieing and taking rsnapshot with it. This would
explain why you're getting stale lockfiles hanging around - a stale
lockfile is a lockfile that contains a PID for a process that doesn't
exist.

Your weekly rotations seem to be OK:

[10/Jun/2007:01:59:01] /usr/bin/rsnapshot weekly: started
[10/Jun/2007:01:59:01] Setting locale to POSIX "C"
[10/Jun/2007:01:59:01] Removing stale lockfile
/var/run/rsnapshot.pid
[10/Jun/2007:01:59:01] /usr/bin/logger -i -p user.err -t rsnapshot
WARNING: Removing stale lockfile /var/run/rsnapshot.pid
[10/Jun/2007:01:59:01] rm -f /var/run/rsnapshot.pid
[10/Jun/2007:01:59:01] echo 20302 > /var/run/rsnapshot.pid
[10/Jun/2007:01:59:01] /bin/rm -rf /.private/.snapshots/weekly.3/
[10/Jun/2007:01:59:29] mv /.private/.snapshots/weekly.2/
/.private/.snapshots/weekly.3/
[10/Jun/2007:01:59:29] mv /.private/.snapshots/weekly.1/
/.private/.snapshots/weekly.2/
[10/Jun/2007:01:59:29] mv /.private/.snapshots/weekly.0/
/.private/.snapshots/weekly.1/
[10/Jun/2007:01:59:29] mv /.private/.snapshots/daily.6/
/.private/.snapshots/weekly.0/
[10/Jun/2007:01:59:29] rm -f /var/run/rsnapshot.pid
[10/Jun/2007:01:59:29] /usr/bin/logger -i -p user.err -t rsnapshot
WARNING: /usr/bin/rsnapshot weekly: completed, but with some
warnings
[10/Jun/2007:01:59:29] WARNING: /usr/bin/rsnapshot weekly:
completed,
but
with some warnings

But that last line, logging that rsnapshot finished, seems to be missing
for all the others.

Can you try running one of the daily rsyncs (you can grab the command
line out of the logs, at least it's logging that Smile by hand and let us
know what happens? I have a suspicion that it's going to run out of
memory, and the OS will kill off some processes so it doesn't die.

Just how much data (how many files) are you backing up, and with how
much memory?

--
David Cantrell | A machine for turning tea into grumpiness

What profiteth a man, if he win a flame war, yet lose his cool?

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post rsnapshot multiple hosts 
David Rasche wrote:

I have watch the process die using the TOP command. I sort the processes
on % of memory and the rm, cp, and rsync process's always end up on top.
Everything starts out running well. I have 6 gigs of memory on the
machine and usually have 4.5 to 5 free at the start of Rsnapshot. The
script always get throught the rm and cp commands without a problem.
Then rsync starts. There are always at lease 2 or 3 rsync processes
running and they take anywhere from 0-6 percent of CPU usage and 0.3 to
0.4 percent of memory. Right before rsync dies, the rsync processes
report 0 CPU usages, then they jump to 60 to 80 percent, then drop back
to 0 for awhile. Memory usage at that point also spikes near the max.
Then all of the rsync processes just disappear.

Have you looked at dmesg to see if you're invoking OOM?

That looks exactly like what I was seeing on my embedded test bed - a
200 MHz, 32 MB RAM box, and rsync would die on a large sync.

By hand the process ran, but from cron it would die.

I finally figured it out:

when I ran it by hand, the diffs were small as I was running the backups
close together.

from cron, rsync had lots of changes to sync and the diffs were big, so
OOM was invoked.

I don't know the internals of rsync, so I'm guessing (I ended up getting
a more powerful platform).

You could try with a smaller tree to see if the problem goes away.

--Yan

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post rsnapshot multiple hosts 
Mark,

Why are you using SSH on cygwin. Are you backing up over the internet?


On 7/19/07, Mark Haney <mhaney < at > ercbroadband.org ([email]mhaney < at > ercbroadband.org[/email])> wrote: David Rasche wrote:
I have not found OOM being invoked. Not sure how the system is killing the
proceeses. I have looked in dmesg, kern.log, syslog, etc.. Nothing
references any issues at the time that Rsync dies.

I am on a dual processor (2 Xeon dual cores) running 2.80 ghz with 6 gig or
memory. Seems like that should be more than enough.

I am going to try and load rsync (cygwin) onto my windows box and backup
with rsync on both ends (verses the local mount of the Samba share) to see
if that helps. I will also try to change the path to a smaller tree size
and
see if that helps.

I don't know that my DIFFs are much different. I have run it manually after
having the script not run for a couple of days, and it finishes. When
running from CRON just 2 hours later, it bombs.

Thanks for the input.

-David Rasche

I've found that cygwin/ssh is the only way to make this work
consistently. And not to use rsyncd on the windows box, do everything
from the server. I can consistently backup over 1TB of data from cron
with that setup on a dual proc athlon64 with 4GB RAM.


--
Recedite, plebes! Gero rem imperialem!


Mark Haney
Sr. Systems Administrator
ERC Broadband
(828) 350-2415

Call (866) ERC-7110 for after hours support


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