SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
Rsnapshot blocked by lockfile
Author Message
Post Rsnapshot blocked by lockfile 
I've used rsnapshot for many years with no problem, but suddenly I've started
getting the following errors:

----------------------------------------------------------------------------
rsnapshot encountered an error! The program was invoked with these options:
/usr/bin/rsnapshot -c /etc/rsnapshot.conf2 hourly
----------------------------------------------------------------------------
ERROR: Lockfile /var/run/rsnapshot2.pid exists and so does its process, can
not continue

I've looked in /var/run and cannot find the rsnapshot2.pid referred to above.
I run rsnapshot with a variety of different conf files, but they are all
behaving the same way.
I've also looked for a running rsnapshot or rsync process in top, but there is
none.
Apart from reading my crontab a day or two ago (not writing/editing it) I
cannot think of anything I might have done to trigger this behaviour.

Bob
--
Registered Linux User #463880 FSFE Member #1300
GPG-FP: A6C1 457C 6DBA B13E 5524 F703 D12A FB79 926B 994E
openSUSE 11.4 64-bit, Kernel 2.6.37.6-0.7-desktop, KDE 4.6.5
Intel Core2 Quad Q9400 2.66GHz, 8GB DDR RAM, nVidia GeForce 9600GT

------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post Rsnapshot blocked by lockfile 
On Sun, Aug 21, 2011 at 10:21, Bob Williams <linux < at > barrowhillfarm.org.uk> wrote:
I've used rsnapshot for many years with no problem, but suddenly I've started
getting the following errors:

----------------------------------------------------------------------------
rsnapshot encountered an error! The program was invoked with these options:
/usr/bin/rsnapshot -c /etc/rsnapshot.conf2 hourly
----------------------------------------------------------------------------
ERROR: Lockfile /var/run/rsnapshot2.pid exists and so does its process, can
not continue

I've looked in /var/run and cannot find the rsnapshot2.pid referred to above.
I run rsnapshot with a variety of different conf files, but they are all
behaving the same way.
I've also looked for a running rsnapshot or rsync process in top, but there is
none.
Apart from reading my crontab a day or two ago (not writing/editing it) I
cannot think of anything I might have done to trigger this behaviour.

What does your rsnapshot log file show about the previous run? Had it
completed by then or has an increase in data to be backed up resulted
in it over-running the next interval?

--
                 Please keep list traffic on the list.

Rob MacGregor
      Whoever fights monsters should see to it that in the process he
        doesn't become a monster.                  Friedrich Nietzsche

------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post Rsnapshot blocked by lockfile 
On Sunday 21 Aug 2011 10:49:37 Rob MacGregor wrote:
On Sun, Aug 21, 2011 at 10:21, Bob Williams <linux < at > barrowhillfarm.org.uk>
wrote:
I've used rsnapshot for many years with no problem, but suddenly I've
started getting the following errors:

-------------------------------------------------------------------------
--- rsnapshot encountered an error! The program was invoked with these
options: /usr/bin/rsnapshot -c /etc/rsnapshot.conf2 hourly
-------------------------------------------------------------------------
--- ERROR: Lockfile /var/run/rsnapshot2.pid exists and so does its
process, can not continue

I've looked in /var/run and cannot find the rsnapshot2.pid referred to
above. I run rsnapshot with a variety of different conf files, but they
are all behaving the same way.
I've also looked for a running rsnapshot or rsync process in top, but
there is none.
Apart from reading my crontab a day or two ago (not writing/editing it) I
cannot think of anything I might have done to trigger this behaviour.

What does your rsnapshot log file show about the previous run? Had it
completed by then or has an increase in data to be backed up resulted
in it over-running the next interval?

This is the log of the latest hourly run:

[21/Aug/2011:10:00:01] /usr/bin/rsnapshot -c /etc/rsnapshot.conf2 hourly:
started
[21/Aug/2011:10:00:01] echo 27177 > /var/run/rsnapshot2.pid
[21/Aug/2011:10:00:01] /bin/rm -rf /castor/Snapshots/hourly.5/
[21/Aug/2011:10:00:02] /usr/bin/rsnapshot -c /etc/rsnapshot.conf2 hourly:
started
[21/Aug/2011:10:00:02] /usr/bin/rsnapshot -c /etc/rsnapshot.conf2 hourly:
ERROR: Lockfile /var/run/rsnapshot2.pid exists and so does its process, can
not continue
[21/Aug/2011:10:00:12] mv /castor/Snapshots/hourly.4/
/castor/Snapshots/hourly.5/
[21/Aug/2011:10:00:12] mv /castor/Snapshots/hourly.3/
/castor/Snapshots/hourly.4/
[21/Aug/2011:10:00:12] mv /castor/Snapshots/hourly.2/
/castor/Snapshots/hourly.3/
[21/Aug/2011:10:00:12] mv /castor/Snapshots/hourly.1/
/castor/Snapshots/hourly.2/
[21/Aug/2011:10:00:12] mv /castor/Snapshots/hourly.0/
/castor/Snapshots/hourly.1/
[21/Aug/2011:10:00:12] mkdir -m 0755 -p /castor/Snapshots/hourly.0/
[21/Aug/2011:10:00:12] /usr/bin/rsync -a --delete --numeric-ids --relative --
delete-excluded --exclude-from=/home/bob/bin/excludedfiles --link-
dest=/castor/Snapshots/hourly.1/localhost/ /home
/castor/Snapshots/hourly.0/localhost/
[21/Aug/2011:10:01:39] /usr/bin/rsync -a --delete --numeric-ids --relative --
delete-excluded --exclude-from=/home/bob/bin/excludedfiles --link-
dest=/castor/Snapshots/hourly.1/localhost/ /etc
/castor/Snapshots/hourly.0/localhost/
[21/Aug/2011:10:01:40] /usr/bin/rsync -a --delete --numeric-ids --relative --
delete-excluded --exclude-from=/home/bob/bin/excludedfiles --link-
dest=/castor/Snapshots/hourly.1/localhost/ /srv
/castor/Snapshots/hourly.0/localhost/
[21/Aug/2011:10:01:40] /usr/bin/rsync -a --delete --numeric-ids --relative --
delete-excluded --exclude-from=/home/bob/bin/excludedfiles --link-
dest=/castor/Snapshots/hourly.1/localhost/ /usr/share/fonts
/castor/Snapshots/hourly.0/localhost/
[21/Aug/2011:10:01:41] /usr/bin/rsync -a --delete --numeric-ids --relative --
delete-excluded --exclude-from=/home/bob/bin/excludedfiles --link-
dest=/castor/Snapshots/hourly.1/localhost/ /var/lib/mysql
/castor/Snapshots/hourly.0/localhost/
[21/Aug/2011:10:01:41] /usr/bin/rsync -a --delete --numeric-ids --relative --
delete-excluded --exclude-from=/home/bob/bin/excludedfiles --link-
dest=/castor/Snapshots/hourly.1/localhost/ /var/log
/castor/Snapshots/hourly.0/localhost/
[21/Aug/2011:10:01:42] touch /castor/Snapshots/hourly.0/
[21/Aug/2011:10:01:42] rm -f /var/run/rsnapshot2.pid
[21/Aug/2011:10:01:42] /usr/bin/rsnapshot -c /etc/rsnapshot.conf2 hourly:
completed successfully

and this is the log of last night's run, where hourly.5 gets moved to daily.0

[20/Aug/2011:22:02:13] /usr/bin/rsnapshot -c /etc/rsnapshot.conf2 hourly:
completed successfully
[21/Aug/2011:01:50:01] /usr/bin/rsnapshot -c /etc/rsnapshot.conf2 daily:
started
[21/Aug/2011:01:50:01] /usr/bin/rsnapshot -c /etc/rsnapshot.conf2 daily:
started
[21/Aug/2011:01:50:01] echo 31290 > /var/run/rsnapshot2.pid
[21/Aug/2011:01:50:01] echo 31291 > /var/run/rsnapshot2.pid
[21/Aug/2011:01:50:01] /usr/bin/rsnapshot -c /etc/rsnapshot.conf2 daily:
ERROR: Could not write lockfile /var/run/rsnapshot2.pid: File exists
[21/Aug/2011:01:50:02] /bin/rm -rf /castor/Snapshots/daily.6/
[21/Aug/2011:01:50:29] mv /castor/Snapshots/daily.5/
/castor/Snapshots/daily.6/
[21/Aug/2011:01:50:29] mv /castor/Snapshots/daily.4/
/castor/Snapshots/daily.5/
[21/Aug/2011:01:50:29] mv /castor/Snapshots/daily.3/
/castor/Snapshots/daily.4/
[21/Aug/2011:01:50:29] mv /castor/Snapshots/daily.2/
/castor/Snapshots/daily.3/
[21/Aug/2011:01:50:29] mv /castor/Snapshots/daily.1/
/castor/Snapshots/daily.2/
[21/Aug/2011:01:50:29] mv /castor/Snapshots/daily.0/
/castor/Snapshots/daily.1/
[21/Aug/2011:01:50:30] mv /castor/Snapshots/hourly.5/
/castor/Snapshots/daily.0/
[21/Aug/2011:01:50:30] rm -f /var/run/rsnapshot2.pid
[21/Aug/2011:01:50:30] /usr/bin/rsnapshot -c /etc/rsnapshot.conf2 daily:
completed successfully
[21/Aug/2011:02:00:01] /usr/bin/rsnapshot -c /etc/rsnapshot.conf2 hourly:
started
[21/Aug/2011:02:00:01] echo 31865 > /var/run/rsnapshot2.pid
[21/Aug/2011:02:00:01] mv /castor/Snapshots/hourly.4/
/castor/Snapshots/hourly.5/
[21/Aug/2011:02:00:01] mv /castor/Snapshots/hourly.3/
/castor/Snapshots/hourly.4/
[21/Aug/2011:02:00:01] mv /castor/Snapshots/hourly.2/
/castor/Snapshots/hourly.3/
[21/Aug/2011:02:00:01] mv /castor/Snapshots/hourly.1/
/castor/Snapshots/hourly.2/
[21/Aug/2011:02:00:01] mv /castor/Snapshots/hourly.0/
/castor/Snapshots/hourly.1/
[21/Aug/2011:02:00:01] mkdir -m 0755 -p /castor/Snapshots/hourly.0/
[21/Aug/2011:02:00:01] /usr/bin/rsync -a --delete --numeric-ids --relative --
delete-excluded --exclude-from=/home/bob/bin/excludedfiles --link-
dest=/castor/Snapshots/hourly.1/localhost/ /home
/castor/Snapshots/hourly.0/localhost/
[21/Aug/2011:02:00:01] /usr/bin/rsnapshot -c /etc/rsnapshot.conf2 hourly:
started
[21/Aug/2011:02:00:01] /usr/bin/rsnapshot -c /etc/rsnapshot.conf2 hourly:
ERROR: Lockfile /var/run/rsnapshot2.pid exists and so does its process, can
not continue

I'm not sure whether these logs are helpful, but will try increasing the
interval between jobs in crontab, and see if that fixes the problem. So, here
is my new crontab entry, increasing the intervals between hourly, daily,
weekly and monthly from 10 minutes to 20 minutes:

# Backup schedule to /castor every 4 hours:
0 2,6,10,14,18,22 * * * root /usr/bin/rsnapshot -c /etc/rsnapshot.conf2 hourly
40 1 * * * root /usr/bin/rsnapshot -c /etc/rsnapshot.conf2 daily
20 1 * * 6 root /usr/bin/rsnapshot -c /etc/rsnapshot.conf2 weekly
0 1 1 * * root /usr/bin/rsnapshot -c /etc/rsnapshot.conf2 monthly


Thanks,

Bob
--
Registered Linux User #463880 FSFE Member #1300
GPG-FP: A6C1 457C 6DBA B13E 5524 F703 D12A FB79 926B 994E
openSUSE 11.4 64-bit, Kernel 2.6.37.6-0.5-desktop, KDE 4.6.5
Intel Core2 Quad Q9400 2.66GHz, 8GB DDR RAM, nVidia GeForce 9600GT

------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post Rsnapshot blocked by lockfile 
On Sun, Aug 21, 2011 at 11:50, Bob Williams <linux < at > barrowhillfarm.org.uk> wrote:
[21/Aug/2011:02:00:01] /usr/bin/rsnapshot -c /etc/rsnapshot.conf2 hourly:
started
[21/Aug/2011:02:00:01] echo 31865 > /var/run/rsnapshot2.pid
[21/Aug/2011:02:00:01] mv /castor/Snapshots/hourly.4/
/castor/Snapshots/hourly.5/
[21/Aug/2011:02:00:01] mv /castor/Snapshots/hourly.3/
/castor/Snapshots/hourly.4/
[21/Aug/2011:02:00:01] mv /castor/Snapshots/hourly.2/
/castor/Snapshots/hourly.3/
[21/Aug/2011:02:00:01] mv /castor/Snapshots/hourly.1/
/castor/Snapshots/hourly.2/
[21/Aug/2011:02:00:01] mv /castor/Snapshots/hourly.0/
/castor/Snapshots/hourly.1/
[21/Aug/2011:02:00:01] mkdir -m 0755 -p /castor/Snapshots/hourly.0/
[21/Aug/2011:02:00:01] /usr/bin/rsync -a --delete --numeric-ids --relative --
delete-excluded --exclude-from=/home/bob/bin/excludedfiles --link-
dest=/castor/Snapshots/hourly.1/localhost/ /home
/castor/Snapshots/hourly.0/localhost/
[21/Aug/2011:02:00:01] /usr/bin/rsnapshot -c /etc/rsnapshot.conf2 hourly:
started
[21/Aug/2011:02:00:01] /usr/bin/rsnapshot -c /etc/rsnapshot.conf2 hourly:
ERROR: Lockfile /var/run/rsnapshot2.pid exists and so does its process, can
not continue

I'm not sure whether these logs are helpful, but will try increasing the
interval between jobs in crontab, and see if that fixes the problem. So, here
is my new crontab entry, increasing the intervals between hourly, daily,
weekly and monthly from 10 minutes to 20 minutes:

It looks like you have 2 hourly jobs being kicked off at the same time:

[21/Aug/2011:02:00:01] /usr/bin/rsnapshot -c /etc/rsnapshot.conf2 hourly:
started
...
[21/Aug/2011:02:00:01] /usr/bin/rsnapshot -c /etc/rsnapshot.conf2 hourly:
started

A little investigation to find out what's going on will probably help
you identify the problem.

--
                 Please keep list traffic on the list.

Rob MacGregor
      Whoever fights monsters should see to it that in the process he
        doesn't become a monster.                  Friedrich Nietzsche

------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post Rsnapshot blocked by lockfile 
On Sunday 21 Aug 2011 11:58:54 Rob MacGregor wrote:
It looks like you have 2 hourly jobs being kicked off at the same time:
[21/Aug/2011:02:00:01] /usr/bin/rsnapshot -c /etc/rsnapshot.conf2 hourly:
started

...

[21/Aug/2011:02:00:01] /usr/bin/rsnapshot -c /etc/rsnapshot.conf2 hourly:
started

You're right! How odd!

A little investigation to find out what's going on will probably help
you identify the problem.

Off to investigate why crontab gets executed twice :~)

Thanks,

Bob
--
Registered Linux User #463880 FSFE Member #1300
GPG-FP: A6C1 457C 6DBA B13E 5524 F703 D12A FB79 926B 994E
openSUSE 11.4 64-bit, Kernel 2.6.37.6-0.5-desktop, KDE 4.6.5
Intel Core2 Quad Q9400 2.66GHz, 8GB DDR RAM, nVidia GeForce 9600GT

------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post Rsnapshot blocked by lockfile 
On Sun, Aug 21, 2011 at 10:21:11AM +0100, Bob Williams wrote:

I've used rsnapshot for many years with no problem, but suddenly I've started
getting the following errors:

----------------------------------------------------------------------------
rsnapshot encountered an error! The program was invoked with these options:
/usr/bin/rsnapshot -c /etc/rsnapshot.conf2 hourly
----------------------------------------------------------------------------
ERROR: Lockfile /var/run/rsnapshot2.pid exists and so does its process, can
not continue

I've looked in /var/run and cannot find the rsnapshot2.pid referred to above.
I run rsnapshot with a variety of different conf files, but they are all
behaving the same way.
I've also looked for a running rsnapshot or rsync process in top, but there is
none.

How often does 'rsnapshot -c ... hourly' run? Has your data grown so
that it now takes slightly longer than that time interval to do a
backup?

The log file should be able to tell you.

If you're not already using the lazy deletes option, then you can turn
that on to reduce the amount of time that rsnapshot holds its lock, but
if you're already getting contention you might still end up with two
processes contending for disk access and so slowing down.

--
David Cantrell | London Perl Mongers Deputy Chief Heretic

Repent through spending

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model
configuration take the hassle out of deploying and managing Subversion and
the tools developers use with it. Learn more about uberSVN and get a free
download at: http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss

Post Rsnapshot blocked by lockfile 
On Monday 22 Aug 2011 12:22:03 David Cantrell wrote:
On Sun, Aug 21, 2011 at 10:21:11AM +0100, Bob Williams wrote:
I've used rsnapshot for many years with no problem, but suddenly I've
started getting the following errors:

-------------------------------------------------------------------------
--- rsnapshot encountered an error! The program was invoked with these
options: /usr/bin/rsnapshot -c /etc/rsnapshot.conf2 hourly
-------------------------------------------------------------------------
--- ERROR: Lockfile /var/run/rsnapshot2.pid exists and so does its
process, can not continue

I've looked in /var/run and cannot find the rsnapshot2.pid referred to
above. I run rsnapshot with a variety of different conf files, but they
are all behaving the same way.
I've also looked for a running rsnapshot or rsync process in top, but
there is none.

How often does 'rsnapshot -c ... hourly' run? Has your data grown so
that it now takes slightly longer than that time interval to do a
backup?

The log file should be able to tell you.

If you're not already using the lazy deletes option, then you can turn
that on to reduce the amount of time that rsnapshot holds its lock, but
if you're already getting contention you might still end up with two
processes contending for disk access and so slowing down.

David, thanks. It seems to be working OK now. For some reason, cron was
running two instances of each entry in crontab, so it was a GNU/linux problem,
not an rsnapshot one. I still haven't worked out what happened (and probably
never will).

Bob
--
Registered Linux User #463880 FSFE Member #1300
GPG-FP: A6C1 457C 6DBA B13E 5524 F703 D12A FB79 926B 994E
openSUSE 11.4 64-bit, Kernel 2.6.37.6-0.5-desktop, KDE 4.6.5
Intel Core2 Quad Q9400 2.66GHz, 8GB DDR RAM, nVidia GeForce 9600GT

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model
configuration take the hassle out of deploying and managing Subversion and
the tools developers use with it. Learn more about uberSVN and get a free
download at: http://p.sf.net/sfu/wandisco-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