Deprecated: __autoload() is deprecated, use spl_autoload_register() instead in /home/pbuc/public_html/forum/mods/ext_phorummail/ezc/Base/src/ezc_bootstrap.php on line 36

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KeyCAPTCHA_CLASS has a deprecated constructor in /home/pbuc/public_html/forum/mods/keycaptcha/keycaptcha.php on line 108
rsnapshot fails intermittently
Welcome! » Log In » Create A New Profile

rsnapshot fails intermittently

Posted by Anonymous 
rsnapshot fails intermittently
October 10, 2014 07:29PM
Many backups are failing. The problem appears to occur when the log file shows WARNINGs like [quote] [quote]
Oct 10 08:28:17 amito.localdomain run-parts[3368]: (/etc/cron.daily) starting rsnapshot
Oct 10 08:39:26 amito.localdomain rsnapshot[3485]: WARNING: Some files and/or directories in /home/ vanished during rsync operation
Oct 10 08:40:35 amito.localdomain rsnapshot[3508]: WARNING: /usr/bin/rsnapshot sync: completed, but with some warnings
Oct 10 08:40:35 amito.localdomain run-parts[3510]: (/etc/cron.daily) finished rsnapshot
[/quote] [/quote] When this kind of warning doesn't appear in the log file, rsnapshot succeeds.

This may be related to my setting: [quote] [quote]
sync_first      1
[/quote] [/quote] Should this warning stop rsnapshot from making a backup? If not, is there some simple way to correct the problem?

The system is:
[quote] Fedora-20 with all upgrades
rsnapshot-1.3.1-12.fc20.noarch
Thanks - jon

[/quote]
rsnapshot fails intermittently
October 10, 2014 07:50PM
This is completely normal when running rsnapshot on a live filesystem, *if* some files and/or folders actually were deleted between rsync first scanned the source and when it got to the files/folders in question to actually copy them.

I get this all the time when rsnapshotting my maildirs, when emails are deleted in between - totally harmless, and expected.

The only way to correct the problem is to take some kind of point-in-time 'snapshot' using, e.g., LVM (or ZFS if you were using that filesystem), and run rsnapshot against the static snapshot instead of the live filesystem.

On 10/10/2014 3:27 PM, Jonathan Ryshpan <jonrysh < at > pacbell.net> ([email]jonrysh < at > pacbell.net[/email]) wrote:

[quote] Many backups are failing.  The problem appears to occur when the log file shows WARNINGs like [quote] [quote]Oct 10 08:28:17 amito.localdomain run-parts[3368]: (/etc/cron.daily) starting rsnapshot
Oct 10 08:39:26 amito.localdomain rsnapshot[3485]: WARNING: Some files and/or directories in /home/ vanished during rsync operation
Oct 10 08:40:35 amito.localdomain rsnapshot[3508]: WARNING: /usr/bin/rsnapshot sync: completed, but with some warnings
Oct 10 08:40:35 amito.localdomain run-parts[3510]: (/etc/cron.daily) finished rsnapshot
[/quote] [/quote] When this kind of warning doesn't appear in the log file, rsnapshot succeeds.

This may be related to my setting: [quote] [quote]sync_first      1
[/quote] [/quote] Should this warning stop rsnapshot from making a backup?  If not, is there some simple way to correct the problem?

The system is:
[quote] Fedora-20 with all upgrades
rsnapshot-1.3.1-12.fc20.noarch Thanks - jon

[/quote]

[quote]------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
[url=http://p.sf.net/sfu/Zoho]http://p.sf.net/sfu/Zoho[/url][/quote]

[quote]_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net ([email]rsnapshot-discuss < at > lists.sourceforge.net[/email])
[url=https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss]https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss[/url]
[/quote] [/quote]
rsnapshot fails intermittently
October 10, 2014 11:30PM
Obviously I haven't made myself clear. The issue is that when these
messages appear in the log no backup appears on the backup device. I
strongly suspected that the log messages were not harmful; but it
appears that rsnapshot thinks that they are and when they appear the
backup is not generated.

Thanks in advance for your help - jon

Charles Marcus wrote:
[quote]Re: [rsnapshot-discuss] rsnapshot fails intermittently
From: Charles Marcus <CMarcus < at > Media-Brokers.com> - 2014-10-10 19:47:56
This is completely normal when running rsnapshot on a live filesystem,
*if* some files and/or folders actually were deleted between rsync first
scanned the source and when it got to the files/folders in question to
actually copy them.

I get this all the time when rsnapshotting my maildirs, when emails are
deleted in between - totally harmless, and expected.

The only way to correct the problem is to take some kind of
point-in-time 'snapshot' using, e.g., LVM (or ZFS if you were using that
filesystem), and run rsnapshot against the static snapshot instead of
the live filesystem.
[/quote]
[quote]On 10/10/2014 3:27 PM, Jonathan Ryshpan <jonrysh < at > ...> wrote:
[quote]Many backups are failing. The problem appears to occur when the log
file shows WARNINGs like

Oct 10 08:28:17 amito.localdomain run-parts[3368]: (/etc/cron.daily) starting rsnapshot
Oct 10 08:39:26 amito.localdomain rsnapshot[3485]: WARNING: Some files and/or directories in /home/ vanished during rsync operation
Oct 10 08:40:35 amito.localdomain rsnapshot[3508]: WARNING: /usr/bin/rsnapshot sync: completed, but with some warnings
Oct 10 08:40:35 amito.localdomain run-parts[3510]: (/etc/cron.daily) finished rsnapshot

When this kind of warning doesn't appear in the log file, rsnapshot
succeeds.

This may be related to my setting:

sync_first 1

Should this warning stop rsnapshot from making a backup? If not, is
there some simple way to correct the problem?

The system is:

Fedora-20 with all upgrades
rsnapshot-1.3.1-12.fc20.noarch
[/quote]
Obviously I haven't made myself clear. The issue is that when these
messages appear in the log no backup appears on the backup device. I
strongly suspected that the log messages were not harmful; but it
appears that rsnapshot thinks they are and when they appear the backup
is not made.

Thanks in advance for your help - jon

[/quote]

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
rsnapshot fails intermittently
October 11, 2014 12:54AM
What I do is run a shell script instead which can test for 0 or those
codes and run the hourly if that occurrs. For me, since I do one every
two hours, if one is missed occasionally, its not too important.

Jonathan Ryshpan <jonrysh < at > pacbell.net> wrote:

[quote]Obviously I haven't made myself clear. The issue is that when these
messages appear in the log no backup appears on the backup device. I
strongly suspected that the log messages were not harmful; but it
appears that rsnapshot thinks that they are and when they appear the
backup is not generated.

Thanks in advance for your help - jon

Charles Marcus wrote:
[quote]Re: [rsnapshot-discuss] rsnapshot fails intermittently
From: Charles Marcus <CMarcus < at > Media-Brokers.com> - 2014-10-10 19:47:56
This is completely normal when running rsnapshot on a live filesystem,
*if* some files and/or folders actually were deleted between rsync first
scanned the source and when it got to the files/folders in question to
actually copy them.

I get this all the time when rsnapshotting my maildirs, when emails are
deleted in between - totally harmless, and expected.

The only way to correct the problem is to take some kind of
point-in-time 'snapshot' using, e.g., LVM (or ZFS if you were using that
filesystem), and run rsnapshot against the static snapshot instead of
the live filesystem.
[/quote]
[quote]On 10/10/2014 3:27 PM, Jonathan Ryshpan <jonrysh < at > ...> wrote:
[quote]Many backups are failing. The problem appears to occur when the log
file shows WARNINGs like

Oct 10 08:28:17 amito.localdomain run-parts[3368]: (/etc/cron.daily) starting rsnapshot
Oct 10 08:39:26 amito.localdomain rsnapshot[3485]: WARNING: Some files and/or directories in /home/ vanished during rsync operation
Oct 10 08:40:35 amito.localdomain rsnapshot[3508]: WARNING: /usr/bin/rsnapshot sync: completed, but with some warnings
Oct 10 08:40:35 amito.localdomain run-parts[3510]: (/etc/cron.daily) finished rsnapshot

When this kind of warning doesn't appear in the log file, rsnapshot
succeeds.

This may be related to my setting:

sync_first 1

Should this warning stop rsnapshot from making a backup? If not, is
there some simple way to correct the problem?

The system is:

Fedora-20 with all upgrades
rsnapshot-1.3.1-12.fc20.noarch
[/quote]
Obviously I haven't made myself clear. The issue is that when these
messages appear in the log no backup appears on the backup device. I
strongly suspected that the log messages were not harmful; but it
appears that rsnapshot thinks they are and when they appear the backup
is not made.

Thanks in advance for your help - jon

[/quote]

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
[/quote]
--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?

John Covici
covici < at > ccs.covici.com

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
rsnapshot fails intermittently
October 14, 2014 08:35PM
I gather from Charles Marcus and Covici's postings that rsnapshot does
fail to generate a backup if a file in one of the directories to be
backed up vanishes during the backup process, and this is intentional.
Returning to the original questions:
1. Should this be rsnapshot's behavior?
2. If not, should rsnapshot always continue in this situration, or
should its continuation be under control of a variable in
rsnapshot.conf?
3. Should I submit a bug? My knowledge of perl is not good enough
for me to submit a patch.
4. Covici suggests a shell script. It's not clear which (return)
codes his script tests for. Can he clarify?
5. Another possibility would be to use a wrapper script for rsync,
setting cmd_rsync=wrapper_rsync.sh in /etc/rsnapshot.conf. This
script would screen out error returns for vanishing files (and
some other errors which rsnapshot treats specially, possibly
putting error messages in the log files. This looks to me like
a kluge; it would be better to patch rsnapshot as suggested in
2.

Thanks to all for their help - jon

[quote]Re: [rsnapshot-discuss] rsnapshot fails intermittently
From: <covici < at > cc...> - 2014-10-11 00:52:22

What I do is run a shell script instead which can test for 0 for those
codes and run the hourly if that occurrs. For me, since I do one every
two hours, if one is missed occasionally, its not too important.
[/quote]
[quote]Jonathan Ryshpan <jonrysh < at > ...> wrote:

[quote]Obviously I haven't made myself clear. The issue is that when these
messages appear in the log no backup appears on the backup device. I
strongly suspected that the log messages were not harmful; but it
appears that rsnapshot thinks that they are and when they appear the
backup is not generated.
[/quote][/quote]
[quote][quote]Charles Marcus wrote:

[quote]Re: [rsnapshot-discuss] rsnapshot fails intermittently
From: Charles Marcus <CMarcus < at > ...> - 2014-10-10 19:47:56
This is completely normal when running rsnapshot on a live filesystem,
*if* some files and/or folders actually were deleted between rsync first
scanned the source and when it got to the files/folders in question to
actually copy them.

I get this all the time when rsnapshotting my maildirs, when emails are
deleted in between - totally harmless, and expected.

The only way to correct the problem is to take some kind of
point-in-time 'snapshot' using, e.g., LVM (or ZFS if you were using that
filesystem), and run rsnapshot against the static snapshot instead of
the live filesystem.
[/quote][/quote][/quote]
[quote][quote][quote]On 10/10/2014 3:27 PM, Jonathan Ryshpan <jonrysh < at > ...> wrote:
[quote]Many backups are failing. The problem appears to occur when the log
file shows WARNINGs like

Oct 10 08:28:17 amito.localdomain run-parts[3368]: (/etc/cron.daily) starting rsnapshot
Oct 10 08:39:26 amito.localdomain rsnapshot[3485]: WARNING: Some files and/or directories in /home/ vanished during rsync operation
Oct 10 08:40:35 amito.localdomain rsnapshot[3508]: WARNING: /usr/bin/rsnapshot sync: completed, but with some warnings
Oct 10 08:40:35 amito.localdomain run-parts[3510]: (/etc/cron.daily) finished rsnapshot

When this kind of warning doesn't appear in the log file, rsnapshot
succeeds.

This may be related to my setting:

sync_first 1

Should this warning stop rsnapshot from making a backup? If not, is
there some simple way to correct the problem?

The system is:

Fedora-20 with all upgrades
rsnapshot-1.3.1-12.fc20.noarch
[/quote][/quote][/quote][/quote]

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
rsnapshot fails intermittently
October 14, 2014 08:41PM
On 10/14/2014 4:33 PM, Jonathan Ryshpan <jonrysh < at > pacbell.net> wrote:
[quote]I gather from Charles Marcus and Covici's postings that rsnapshot does
fail to generate a backup if a file in one of the directories to be
backed up vanishes during the backup process, and this is intentional.
[/quote]
This is incorrect. Per my post, *all* of my backups *routinely* have
files that vanish between the initial scan and the backup (I'm backing
up live maildirs), and I've never had one fail.

So that, by itself, isn't your problem, unless maybe there is a config
option that enables this behavior?

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
rsnapshot fails intermittently
October 14, 2014 08:42PM
I think the codes are 23 or 24, I actually don't bother to test for them
anymore, since it backs up so often that if I miss one its not that
important. But I have the srsnapshot sync and of course I have
syncfirst equal to 1 in the rsnapshot.conf. I also, put the standard
output of rsync to a log, the standard error gets mailed to me via the
cron daemon.

Hope this helps.

Jonathan Ryshpan <jonrysh < at > pacbell.net> wrote:

[quote]I gather from Charles Marcus and Covici's postings that rsnapshot does
fail to generate a backup if a file in one of the directories to be
backed up vanishes during the backup process, and this is intentional.
Returning to the original questions:
1. Should this be rsnapshot's behavior?
2. If not, should rsnapshot always continue in this situration, or
should its continuation be under control of a variable in
rsnapshot.conf?
3. Should I submit a bug? My knowledge of perl is not good enough
for me to submit a patch.
4. Covici suggests a shell script. It's not clear which (return)
codes his script tests for. Can he clarify?
5. Another possibility would be to use a wrapper script for rsync,
setting cmd_rsync=wrapper_rsync.sh in /etc/rsnapshot.conf. This
script would screen out error returns for vanishing files (and
some other errors which rsnapshot treats specially, possibly
putting error messages in the log files. This looks to me like
a kluge; it would be better to patch rsnapshot as suggested in
2.

Thanks to all for their help - jon

[quote]Re: [rsnapshot-discuss] rsnapshot fails intermittently
From: <covici < at > cc...> - 2014-10-11 00:52:22

What I do is run a shell script instead which can test for 0 for those
codes and run the hourly if that occurrs. For me, since I do one every
two hours, if one is missed occasionally, its not too important.
[/quote]
[quote]Jonathan Ryshpan <jonrysh < at > ...> wrote:

[quote]Obviously I haven't made myself clear. The issue is that when these
messages appear in the log no backup appears on the backup device. I
strongly suspected that the log messages were not harmful; but it
appears that rsnapshot thinks that they are and when they appear the
backup is not generated.
[/quote][/quote]
[quote][quote]Charles Marcus wrote:

[quote]Re: [rsnapshot-discuss] rsnapshot fails intermittently
From: Charles Marcus <CMarcus < at > ...> - 2014-10-10 19:47:56
This is completely normal when running rsnapshot on a live filesystem,
*if* some files and/or folders actually were deleted between rsync first
scanned the source and when it got to the files/folders in question to
actually copy them.

I get this all the time when rsnapshotting my maildirs, when emails are
deleted in between - totally harmless, and expected.

The only way to correct the problem is to take some kind of
point-in-time 'snapshot' using, e.g., LVM (or ZFS if you were using that
filesystem), and run rsnapshot against the static snapshot instead of
the live filesystem.
[/quote][/quote][/quote]
[quote][quote][quote]On 10/10/2014 3:27 PM, Jonathan Ryshpan <jonrysh < at > ...> wrote:
[quote]Many backups are failing. The problem appears to occur when the log
file shows WARNINGs like

Oct 10 08:28:17 amito.localdomain run-parts[3368]: (/etc/cron.daily) starting rsnapshot
Oct 10 08:39:26 amito.localdomain rsnapshot[3485]: WARNING: Some files and/or directories in /home/ vanished during rsync operation
Oct 10 08:40:35 amito.localdomain rsnapshot[3508]: WARNING: /usr/bin/rsnapshot sync: completed, but with some warnings
Oct 10 08:40:35 amito.localdomain run-parts[3510]: (/etc/cron.daily) finished rsnapshot

When this kind of warning doesn't appear in the log file, rsnapshot
succeeds.

This may be related to my setting:

sync_first 1

Should this warning stop rsnapshot from making a backup? If not, is
there some simple way to correct the problem?

The system is:

Fedora-20 with all upgrades
rsnapshot-1.3.1-12.fc20.noarch
[/quote][/quote][/quote][/quote]

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
[/quote]
--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?

John Covici
covici < at > ccs.covici.com

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
rsnapshot fails intermittently
October 18, 2014 08:08PM
On Tue, 2014-10-14 at 16:38 -0400, Charles Marcus wrote:
[quote]On 10/14/2014 4:33 PM, Jonathan Ryshpan <jonrysh < at > pacbell.net> wrote:
[quote]I gather from Charles Marcus and Covici's postings that rsnapshot does
fail to generate a backup if a file in one of the directories to be
backed up vanishes during the backup process, and this is intentional.
[/quote]
This is incorrect. Per my post, *all* of my backups *routinely* have
files that vanish between the initial scan and the backup (I'm backing
up live maildirs), and I've never had one fail.

So that, by itself, isn't your problem, unless maybe there is a config
option that enables this behavior?
[/quote]
You are correct. I have made a mistake by invoking rsnapshot in
cron.daily as recommended on the rsnapshot man page, namely

#!/bin/sh
nice /usr/bin/rsnapshot sync && nice /usr/bin/rsnapshot daily

The invocation of "/usr/bin/rsnapshot daily" happens only if rsnapshot
has exit value 0; however the exit value is
2 [if] Some warnings occurred, but the backup still finished

So "rsnapshot daily" should be invoked when "rsnapshot sync" has an exit
value of either 0 or 2. I believe the following script
in /etc/cron.daily/rsnapshot does the job, but my scripting is very
rusty. Can someone check it?

#!/bin/bash

nice /usr/bin/rsnapshot sync; r=$?
if ( (($r==0)) || (($r==2)) ); then
nice /usr/bin/rsnapshot daily;
fi

If this reasoning is correct the advice about setting up a cron script
as advised in the rsnapshot man page a little after line 500 is not
correct and is, in fact, a trap for the unwary. Comments?

Thanks to all - jon

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
rsnapshot fails intermittently
October 18, 2014 11:21PM
I don't understand what you did in that if statement. Usually its if [
something -eq 0 ]; ... endif

Jonathan Ryshpan <jonrysh < at > pacbell.net> wrote:

[quote]On Tue, 2014-10-14 at 16:38 -0400, Charles Marcus wrote:
[quote]On 10/14/2014 4:33 PM, Jonathan Ryshpan <jonrysh < at > pacbell.net> wrote:
[quote]I gather from Charles Marcus and Covici's postings that rsnapshot does
fail to generate a backup if a file in one of the directories to be
backed up vanishes during the backup process, and this is intentional.
[/quote]
This is incorrect. Per my post, *all* of my backups *routinely* have
files that vanish between the initial scan and the backup (I'm backing
up live maildirs), and I've never had one fail.

So that, by itself, isn't your problem, unless maybe there is a config
option that enables this behavior?
[/quote]
You are correct. I have made a mistake by invoking rsnapshot in
cron.daily as recommended on the rsnapshot man page, namely

#!/bin/sh
nice /usr/bin/rsnapshot sync && nice /usr/bin/rsnapshot daily

The invocation of "/usr/bin/rsnapshot daily" happens only if rsnapshot
has exit value 0; however the exit value is
2 [if] Some warnings occurred, but the backup still finished

So "rsnapshot daily" should be invoked when "rsnapshot sync" has an exit
value of either 0 or 2. I believe the following script
in /etc/cron.daily/rsnapshot does the job, but my scripting is very
rusty. Can someone check it?

#!/bin/bash

nice /usr/bin/rsnapshot sync; r=$?
if ( (($r==0)) || (($r==2)) ); then
nice /usr/bin/rsnapshot daily;
fi

If this reasoning is correct the advice about setting up a cron script
as advised in the rsnapshot man page a little after line 500 is not
correct and is, in fact, a trap for the unwary. Comments?

Thanks to all - jon

[/quote]
--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?

John Covici
covici < at > ccs.covici.com

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
rsnapshot fails intermittently
October 19, 2014 05:32PM
The if statement in his script is doing a numerical test '(('. Another
way, cleaner and simpler in my opinion, since you are using bash and
not sh, is to use '[[' with variable equivalence instead, as in:

#!/bin/bash

nice /usr/bin/rsnapshot sync
[[ ${?} =~ 0|2 ]] && {
nice /usr/bin/rsnapshot daily
} || {
echo "'rsnapshot sync' failed."
}

I personally prefer this form, as it's simple, removes unneeded
keywords, and combines tests in an easily readable and understandable
way.

--
Regards,
Christopher Barry

Random geeky fortune:
Advertising may be described as the science of arresting the human
intelligence long enough to get money from it.

On Sat, 18 Oct 2014 19:19:39 -0400
covici < at > ccs.covici.com wrote:

[quote]I don't understand what you did in that if statement. Usually its if [
something -eq 0 ]; ... endif

Jonathan Ryshpan <jonrysh < at > pacbell.net> wrote:

[quote]On Tue, 2014-10-14 at 16:38 -0400, Charles Marcus wrote:
[quote]On 10/14/2014 4:33 PM, Jonathan Ryshpan <jonrysh < at > pacbell.net>
wrote:
[quote]I gather from Charles Marcus and Covici's postings that
rsnapshot does fail to generate a backup if a file in one of the
directories to be backed up vanishes during the backup process,
and this is intentional.
[/quote]
This is incorrect. Per my post, *all* of my backups *routinely*
have files that vanish between the initial scan and the backup
(I'm backing up live maildirs), and I've never had one fail.

So that, by itself, isn't your problem, unless maybe there is a
config option that enables this behavior?
[/quote]
You are correct. I have made a mistake by invoking rsnapshot in
cron.daily as recommended on the rsnapshot man page, namely

#!/bin/sh
nice /usr/bin/rsnapshot sync && nice /usr/bin/rsnapshot daily

The invocation of "/usr/bin/rsnapshot daily" happens only if
rsnapshot has exit value 0; however the exit value is
2 [if] Some warnings occurred, but the backup still finished

So "rsnapshot daily" should be invoked when "rsnapshot sync" has an
exit value of either 0 or 2. I believe the following script
in /etc/cron.daily/rsnapshot does the job, but my scripting is very
rusty. Can someone check it?

#!/bin/bash

nice /usr/bin/rsnapshot sync; r=$?
if ( (($r==0)) || (($r==2)) ); then
nice /usr/bin/rsnapshot daily;
fi

If this reasoning is correct the advice about setting up a cron
script as advised in the rsnapshot man page a little after line 500
is not correct and is, in fact, a trap for the unwary. Comments?

Thanks to all - jon

[/quote]
[/quote]

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
rsnapshot fails intermittently
October 19, 2014 06:27PM
rsnapshot returns a number rather than a character, so I thought that on
general principles the value should be tested as a number. CB's script
is elegant, short, and not too difficult to understand; but unnatural
for people most of whose experience (like mine) is mostly with control
flow languages. Tastes differ.

An error message is definitely necessary. I have modified my script to
contain one, so it now reads:

#!/bin/bash

nice /usr/bin/rsnapshot sync; r=$?
if ( (($r==0)) || (($r==2)) ); then
nice /usr/bin/rsnapshot daily;
else
echo "'rsnapshot sync' failed.";
fi

On Sun, 2014-10-19 at 13:30 -0400, Christopher Barry wrote:
[quote]The if statement in his script is doing a numerical test '(('. Another
way, cleaner and simpler in my opinion, since you are using bash and
not sh, is to use '[[' with variable equivalence instead, as in:

#!/bin/bash

nice /usr/bin/rsnapshot sync
[[ ${?} =~ 0|2 ]] && {
nice /usr/bin/rsnapshot daily
} || {
echo "'rsnapshot sync' failed."
}

I personally prefer this form, as it's simple, removes unneeded
keywords, and combines tests in an easily readable and understandable
way.
[/quote]
[quote]On Sat, 18 Oct 2014 19:19:39 -0400
covici < at > ccs.covici.com wrote:

[quote]I don't understand what you did in that if statement. Usually its if [
something -eq 0 ]; ... endif

Jonathan Ryshpan <jonrysh < at > pacbell.net> wrote:
...
[quote]So "rsnapshot daily" should be invoked when "rsnapshot sync" has an
exit value of either 0 or 2. I believe the following script
in /etc/cron.daily/rsnapshot does the job, but my scripting is very
rusty. Can someone check it?

#!/bin/bash

nice /usr/bin/rsnapshot sync; r=$?
if ( (($r==0)) || (($r==2)) ); then
nice /usr/bin/rsnapshot daily;
fi
[/quote][/quote][/quote]

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
rsnapshot fails intermittently
October 19, 2014 07:06PM
TMTOWTDI!

Cheers :)

On Sun, 19 Oct 2014 11:24:20 -0700
Jonathan Ryshpan <jonrysh < at > pacbell.net> wrote:

[quote]rsnapshot returns a number rather than a character, so I thought that
on general principles the value should be tested as a number. CB's
script is elegant, short, and not too difficult to understand; but
unnatural for people most of whose experience (like mine) is mostly
with control flow languages. Tastes differ.

An error message is definitely necessary. I have modified my script to
contain one, so it now reads:

#!/bin/bash

nice /usr/bin/rsnapshot sync; r=$?
if ( (($r==0)) || (($r==2)) ); then
nice /usr/bin/rsnapshot daily;
else
echo "'rsnapshot sync' failed.";
fi

On Sun, 2014-10-19 at 13:30 -0400, Christopher Barry wrote:
[quote]The if statement in his script is doing a numerical test '(('.
Another way, cleaner and simpler in my opinion, since you are using
bash and not sh, is to use '[[' with variable equivalence instead,
as in:

#!/bin/bash

nice /usr/bin/rsnapshot sync
[[ ${?} =~ 0|2 ]] && {
nice /usr/bin/rsnapshot daily
} || {
echo "'rsnapshot sync' failed."
}

I personally prefer this form, as it's simple, removes unneeded
keywords, and combines tests in an easily readable and understandable
way.
[/quote]
[quote]On Sat, 18 Oct 2014 19:19:39 -0400
covici < at > ccs.covici.com wrote:

[quote]I don't understand what you did in that if statement. Usually its
if [ something -eq 0 ]; ... endif

Jonathan Ryshpan <jonrysh < at > pacbell.net> wrote:
...
[quote]So "rsnapshot daily" should be invoked when "rsnapshot sync" has
an exit value of either 0 or 2. I believe the following script
in /etc/cron.daily/rsnapshot does the job, but my scripting is
very rusty. Can someone check it?

#!/bin/bash

nice /usr/bin/rsnapshot sync; r=$?
if ( (($r==0)) || (($r==2)) ); then
nice /usr/bin/rsnapshot daily;
fi
[/quote][/quote][/quote]

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push
notifications. Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
[/quote]

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
rsnapshot fails intermittently
October 20, 2014 01:27AM
Hallo, Christopher,

Du meintest am 19.10.14:

[quote]The if statement in his script is doing a numerical test '(('.
Another way, cleaner and simpler in my opinion, since you are using
bash and not sh, is to use '[[' with variable equivalence instead, as
in:
[/quote]

[quote]#!/bin/bash
[/quote]
[quote]nice /usr/bin/rsnapshot sync
[[ ${?} =~ 0|2 ]] && {
nice /usr/bin/rsnapshot daily
} || {
echo "'rsnapshot sync' failed."
}
[/quote]
(untested)

nice /usr/bin/rsnapshot sync
case $? in
0|2)
nice /usr/bin/rsnapshot daily
;;
*)
echo "'rsnapshot sync' failed."
;;
esac

Viele Gruesse!
Helmut

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
rsnapshot fails intermittently
October 20, 2014 03:30AM
On Sun, 19 Oct 2014 21:53:00 +0200
"Helmut Hullen" <hhullen < at > aktivanet.de> wrote:

[quote]Hallo, Christopher,

Du meintest am 19.10.14:

[quote]The if statement in his script is doing a numerical test '(('.
Another way, cleaner and simpler in my opinion, since you are using
bash and not sh, is to use '[[' with variable equivalence instead, as
in:
[/quote]

[quote]#!/bin/bash
[/quote]
[quote]nice /usr/bin/rsnapshot sync
[[ ${?} =~ 0|2 ]] && {
nice /usr/bin/rsnapshot daily
} || {
echo "'rsnapshot sync' failed."
}
[/quote]
(untested)

nice /usr/bin/rsnapshot sync
case $? in
0|2)
nice /usr/bin/rsnapshot daily
;;
*)
echo "'rsnapshot sync' failed."
;;
esac

Viele Gruesse!
Helmut

[/quote]
Yes! Beautiful! :)

-C

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
rsnapshot fails intermittently
October 20, 2014 05:40AM
On Sun, 19 Oct 2014 21:53:00 +0200
"Helmut Hullen" <hhullen < at > aktivanet.de> wrote:

[quote]Hallo, Christopher,

Du meintest am 19.10.14:

[quote]The if statement in his script is doing a numerical test '(('.
Another way, cleaner and simpler in my opinion, since you are using
bash and not sh, is to use '[[' with variable equivalence instead, as
in:
[/quote]

[quote]#!/bin/bash
[/quote]
[quote]nice /usr/bin/rsnapshot sync
[[ ${?} =~ 0|2 ]] && {
nice /usr/bin/rsnapshot daily
} || {
echo "'rsnapshot sync' failed."
}
[/quote]
(untested)

nice /usr/bin/rsnapshot sync
case $? in
0|2)
nice /usr/bin/rsnapshot daily
;;
*)
echo "'rsnapshot sync' failed."
;;
esac

Viele Gruesse!
Helmut

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push
notifications. Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
[/quote]

how about this:

#!/bin/bash

s="nice rsnapshot sync"
d="nice rsnapshot daily"

$s || { (($?==2)) || { echo "$s failed"; exit 1; } } && $d

--
Regards,
Christopher Barry

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
rsnapshot fails intermittently
October 22, 2014 12:28PM
On Sun, Oct 19, 2014 at 03:04:23PM -0400, Christopher Barry wrote:

[quote]TMTOWTDI!
[/quote]
BMOTAW :-)

(but most of them are wrong)

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

Feature: an incorrectly implemented bug

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
rsnapshot fails intermittently
October 22, 2014 10:07PM
On Wed, Oct 22, 2014 at 1:26 PM, David Cantrell <david < at > cantrell.org.uk ([email]david < at > cantrell.org.uk[/email])> wrote:
[quote]On Sun, Oct 19, 2014 at 03:04:23PM -0400, Christopher Barry wrote:

[quote]TMTOWTDI!
[/quote]
BMOTAW :-)

(but most of them are wrong)

[/quote]

IHTFIWEOYITA! (I Haven&#39;t The Faintest Idea What Either Of You Is Talking About).

poc
Sorry, only registered users may post in this forum.

Click here to login