Discussion:
[rsnapshot-discuss] Returned 255 while processing - Rolling back is lengthy
Thierry Lavallee
2015-07-15 17:13:38 UTC
Permalink
Hi,

I am getting these errors. Looks like the connection with the remote
server might have died.

***@fileserver:~# tail -f /var/log/rsnapshot/rsnapshot_Media02_cpbackup.log

[15/Jul/2015:08:04:02] /usr/bin/rsnapshot -c
/root/scripts/backup/rsnapshot.Media02_cpbackup.conf daily: started
[15/Jul/2015:08:04:02] echo 10645 > /var/run/rsnapshot_Media02new.pid
[15/Jul/2015:08:04:02] mv /media/backupMedia02b/home/daily.2/
/media/backupMedia02b/home/daily.3/
[15/Jul/2015:08:04:02] mv /media/backupMedia02b/home/daily.1/
/media/backupMedia02b/home/daily.2/
[15/Jul/2015:08:04:02] mv /media/backupMedia02b/home/daily.0/
/media/backupMedia02b/home/daily.1/
[15/Jul/2015:08:04:02] mkdir -m 0755 -p /media/backupMedia02b/home/daily.0/
[15/Jul/2015:08:04:02] /usr/bin/rsync -ax --delete --numeric-ids
--delete-excluded --rsh="/usr/bin/ssh -i /root/.ssh/id_rsa"
--link-dest=/media/backupMedia02b/home/daily.1/
***@Media02.domain.com:/backup/cpbackup/daily/
/media/backupMedia02b/home/daily.0/
*[15/Jul/2015:08:52:32] /usr/bin/rsnapshot -c
/root/scripts/backup/rsnapshot.Media02_cpbackup.conf daily: ERROR:
/usr/bin/rsync returned 255 while processing
***@Media02.domain.com:/backup/cpbackup/daily/*
[15/Jul/2015:08:52:32] Rolling back ""
[15/Jul/2015:08:52:32] /bin/rm -rf /media/backupMedia02b/home/daily.0/


Yet "*Rolling Back*" takes more than 8 hours to process. It is a 400 GB
repositary

From the log:
[15/Jul/2015:08:52:32] /bin/rm -rf /media/backupMedia02b/home/daily.0/
[15/Jul/2015:11:32:18] /bin/cp -al /media/backupMedia02b/home/daily.1
/media/backupMedia02b/home/daily.0

Looks like the SSH connection should be made BEFORE the whole process of
moving the repositary is done. This would avoid this whole loss of time.

Also, seems that the quick mv done when initiating the backup could also
be done in the roll back.

Anyway, is there any way to make things better on my end?
thanks
Gordon Messmer
2015-07-15 17:25:43 UTC
Permalink
Post by Thierry Lavallee
Looks like the SSH connection should be made BEFORE the whole process
of moving the repositary is done. This would avoid this whole loss of
time.
You can use "sync_first" to accomplish that.
Thierry Lavallee
2015-07-15 17:36:28 UTC
Permalink
Post by Gordon Messmer
You can use "sync_first" to accomplish that.
Seems like I don't have any mention of "sync_first" in my conf file. :/

rsnapshot 1.3.1
config_version 1.2
Gordon Messmer
2015-07-15 17:39:27 UTC
Permalink
Post by Thierry Lavallee
Post by Gordon Messmer
You can use "sync_first" to accomplish that.
Seems like I don't have any mention of "sync_first" in my conf file. :/
You probably wouldn't, normally. Check the man page for rsnapshot, and
add the directive if that's how you want your backups to work.
Thierry Lavallee
2015-07-15 18:17:05 UTC
Permalink
Post by Gordon Messmer
Post by Thierry Lavallee
Seems like I don't have any mention of "sync_first" in my conf file. :/
You probably wouldn't, normally. Check the man page for rsnapshot, and
add the directive if that's how you want your backups to work.
Thanks.
This is an _*existing*_ repo. I want to avoid transferring the whole
source again. Would prefer to base it on something already on the
destination like daily.0 for the very first time. Any tip?

PS: sorry if some questions are newbie. I just don't want to screw my
stuff... again. ;)
Gordon Messmer
2015-07-15 18:30:32 UTC
Permalink
Post by Thierry Lavallee
This is an _*existing*_ repo. I want to avoid transferring the whole
source again. Would prefer to base it on something already on the
destination like daily.0 for the very first time. Any tip?
cp -al daily.0 .sync

... at least, as I understand it.
Thierry Lavallee
2015-07-16 10:53:28 UTC
Permalink
I added "sync_first 1" somewhere in my config

And this is my result now:
[16/Jul/2015:06:43:03] /usr/bin/rsnapshot -c
/root/scripts/backup/rsnapshot.media02_cpbackup.conf daily: started
[16/Jul/2015:06:43:03] echo 14823 > /var/run/rsnapshot_media02new.pid
[16/Jul/2015:06:43:03] mv /media/backupmedia02b/home/daily.2/
/media/backupmedia02b/home/daily.3/
[16/Jul/2015:06:43:03] mv /media/backupmedia02b/home/daily.1/
/media/backupmedia02b/home/daily.2/
[16/Jul/2015:06:43:03] mv /media/backupmedia02b/home/daily.0/
/media/backupmedia02b/home/daily.1/
[16/Jul/2015:06:43:03] mv /media/backupmedia02b/home/.sync/
/media/backupmedia02b/home/daily.0/
[16/Jul/2015:06:43:03] rm -f /var/run/rsnapshot_media02new.pid
[16/Jul/2015:06:43:03] /usr/bin/rsnapshot -c
/root/scripts/backup/rsnapshot.media02_cpbackup.conf daily: completed
successfully

Seems like it just renamed folder. No syncing, no backup.
any clue? thanks
l***@gmail.com
2015-07-16 11:05:01 UTC
Permalink
Post by Thierry Lavallee
I added "sync_first 1" somewhere in my config
[16/Jul/2015:06:43:03] /usr/bin/rsnapshot -c
/root/scripts/backup/rsnapshot.media02_cpbackup.conf daily: started
[16/Jul/2015:06:43:03] echo 14823 > /var/run/rsnapshot_media02new.pid
[16/Jul/2015:06:43:03] mv /media/backupmedia02b/home/daily.2/
/media/backupmedia02b/home/daily.3/
[16/Jul/2015:06:43:03] mv /media/backupmedia02b/home/daily.1/
/media/backupmedia02b/home/daily.2/
[16/Jul/2015:06:43:03] mv /media/backupmedia02b/home/daily.0/
/media/backupmedia02b/home/daily.1/
[16/Jul/2015:06:43:03] mv /media/backupmedia02b/home/.sync/
/media/backupmedia02b/home/daily.0/
[16/Jul/2015:06:43:03] rm -f /var/run/rsnapshot_media02new.pid
[16/Jul/2015:06:43:03] /usr/bin/rsnapshot -c
/root/scripts/backup/rsnapshot.media02_cpbackup.conf daily: completed
successfully
Seems like it just renamed folder. No syncing, no backup.
any clue? thanks
The clue is "man rsnapshot". :-)

Did you run it before the lowest level?

Regards,
ST
--
Thierry Lavallee
2015-07-16 11:18:26 UTC
Permalink
Did you run it before the lowest level? Regards, ST
ok thanks! I had not seen that I had to run like this

/usr/bin/rsnapshot -c
/root/scripts/backup/rsnapshot.media02_cpbackup.conf sync &&
/usr/bin/rsnapshot -c
/root/scripts/backup/rsnapshot.media02_cpbackup.conf daily

I just hope that this will not run the daily if the sync did not workout
because of connection problem to the remote server.
Because this is the main reason for me to run sync_first
c***@ccs.covici.com
2015-07-15 19:32:35 UTC
Permalink
syncfirst is very valuable here since you can just run it over again
with no consequences.
Post by Thierry Lavallee
Hi,
I am getting these errors. Looks like the connection with the remote
server might have died.
[15/Jul/2015:08:04:02] /usr/bin/rsnapshot -c
/root/scripts/backup/rsnapshot.Media02_cpbackup.conf daily: started
[15/Jul/2015:08:04:02] echo 10645 > /var/run/rsnapshot_Media02new.pid
[15/Jul/2015:08:04:02] mv /media/backupMedia02b/home/daily.2/
/media/backupMedia02b/home/daily.3/
[15/Jul/2015:08:04:02] mv /media/backupMedia02b/home/daily.1/
/media/backupMedia02b/home/daily.2/
[15/Jul/2015:08:04:02] mv /media/backupMedia02b/home/daily.0/
/media/backupMedia02b/home/daily.1/
[15/Jul/2015:08:04:02] mkdir -m 0755 -p /media/backupMedia02b/home/daily.0/
[15/Jul/2015:08:04:02] /usr/bin/rsync -ax --delete --numeric-ids
--delete-excluded --rsh="/usr/bin/ssh -i /root/.ssh/id_rsa"
--link-dest=/media/backupMedia02b/home/daily.1/
/media/backupMedia02b/home/daily.0/
*[15/Jul/2015:08:52:32] /usr/bin/rsnapshot -c
/usr/bin/rsync returned 255 while processing
[15/Jul/2015:08:52:32] Rolling back ""
[15/Jul/2015:08:52:32] /bin/rm -rf /media/backupMedia02b/home/daily.0/
Yet "*Rolling Back*" takes more than 8 hours to process. It is a 400
GB repositary
[15/Jul/2015:08:52:32] /bin/rm -rf /media/backupMedia02b/home/daily.0/
[15/Jul/2015:11:32:18] /bin/cp -al /media/backupMedia02b/home/daily.1
/media/backupMedia02b/home/daily.0
Looks like the SSH connection should be made BEFORE the whole process
of moving the repositary is done. This would avoid this whole loss of
time.
Also, seems that the quick mv done when initiating the backup could
also be done in the roll back.
Anyway, is there any way to make things better on my end?
thanks
----------------------------------------------------
----------------------------------------------------
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________
rsnapshot-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?

John Covici
***@ccs.covici.com
Thierry Lavallee
2015-07-16 13:36:42 UTC
Permalink
So I did run this:

/usr/bin/rsnapshot -c
/root/scripts/backup/rsnapshot.media02_cpbackup.conf sync &&
/usr/bin/rsnapshot -c
/root/scripts/backup/rsnapshot.media02_cpbackup.conf daily

And this was my log:

[16/Jul/2015:07:14:42] /usr/bin/rsnapshot -c
/root/scripts/backup/rsnapshot.media02_cpbackup.conf sync: started
[16/Jul/2015:07:14:42] echo 22379 > /var/run/rsnapshot_media02new.pid
[16/Jul/2015:07:14:42] /usr/bin/rsync -ax --delete --numeric-ids
--delete-excluded --rsh="/usr/bin/ssh -i /root/.ssh/id_rsa"
--link-dest=/media/backupmedia02b/home/daily.0/
***@media02.my-hosting.com:/backup/cpbackup/daily/
/media/backupmedia02b/home/.sync/
[16/Jul/2015:08:47:15] touch /media/backupmedia02b/home/.sync/
[16/Jul/2015:08:47:15] rm -f /var/run/rsnapshot_media02new.pid
[16/Jul/2015:08:47:15] /usr/bin/rsnapshot -c
/root/scripts/backup/rsnapshot.media02_cpbackup.conf sync: completed
successfully
[16/Jul/2015:08:47:15] /usr/bin/rsnapshot -c
/root/scripts/backup/rsnapshot.media02_cpbackup.conf daily: started
[16/Jul/2015:08:47:15] echo 11034 > /var/run/rsnapshot_media02new.pid
[16/Jul/2015:08:47:15] mv /media/backupmedia02b/home/daily.2/
/media/backupmedia02b/home/daily.3/
[16/Jul/2015:08:47:15] mv /media/backupmedia02b/home/daily.1/
/media/backupmedia02b/home/daily.2/
[16/Jul/2015:08:47:15] mv /media/backupmedia02b/home/daily.0/
/media/backupmedia02b/home/daily.1/
[16/Jul/2015:08:47:15] mv /media/backupmedia02b/home/.sync/
/media/backupmedia02b/home/daily.0/
[16/Jul/2015:08:47:15] rm -f /var/run/rsnapshot_media02new.pid
[16/Jul/2015:08:47:15] /usr/bin/rsnapshot -c
/root/scripts/backup/rsnapshot.media02_cpbackup.conf daily: completed
successfully

Looked good... Then I looked in my directory and .sync directory was
gone because of "[16/Jul/2015:08:47:15] mv
/media/backupmedia02b/home/.sync/ /media/backupmedia02b/home/daily.0/"
... I thought the .sync would stay for next run.

So I did run this AGAIN, just because from our discussion, if I had a
connection error this would not screw up my directories:

/usr/bin/rsnapshot -c
/root/scripts/backup/rsnapshot.media02_cpbackup.conf sync &&
/usr/bin/rsnapshot -c
/root/scripts/backup/rsnapshot.media02_cpbackup.conf daily


But I DID get a connection error... So I am wondering how come the
script still makes this LENGTHY /bin/cp at the end. I might wait 8 hours
now just for this.

[16/Jul/2015:09:28:24] /usr/bin/rsnapshot -c
/root/scripts/backup/rsnapshot.media02_cpbackup.conf sync: started
[16/Jul/2015:09:28:24] echo 20985 > /var/run/rsnapshot_media02new.pid
[16/Jul/2015:09:28:24] mkdir -m 0755 -p /media/backupmedia02b/home/.sync/
[16/Jul/2015:09:28:24] /usr/bin/rsync -ax --delete --numeric-ids
--delete-excluded --rsh="/usr/bin/ssh -i /root/.ssh/id_rsa"
--link-dest=/media/backupmedia02b/home/daily.0/
***@media02.my-hosting.com:/backup/cpbackup/daily/
/media/backupmedia02b/home/.sync/
[16/Jul/2015:09:28:45] /usr/bin/rsnapshot -c
/root/scripts/backup/rsnapshot.media02_cpbackup.conf sync: ERROR:
/usr/bin/rsync returned 255 while processing
***@media02.my-hosting.com:/backup/cpbackup/daily/
[16/Jul/2015:09:28:45] Rolling back ""
[16/Jul/2015:09:28:45] /bin/rm -rf /media/backupmedia02b/home/.sync/
[16/Jul/2015:09:28:45] /bin/cp -al /media/backupmedia02b/home/daily.0
/media/backupmedia02b/home/.sync

Thanks for your help.

Loading...