 |
Page 1 of 2
|
| Author |
Message |
David M. Besonen
Guest
|
 snapshot_root pruning
can a snapshot_root that has these directories:
daily.0
daily.1
daily.2
daily.3
daily.4
daily.5
have daily.0 and daily.1 pruned without repercussions (i.e.,
rsnapshot will continue to use the pruned snapshot_root
without issue)?
to be explicit, the following would be the pruning operation:
daily.0 -> deleted
daily.1 -> deleted
daily.2 -> renamed to daily.0
daily.3 -> renamed to daily.1
daily.4 -> renamed to daily.2
daily.5 -> renamed to daily.3
thanks,
david
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
|
| Wed Jan 27, 2010 1:21 pm |
|
 |
Jeffrey G Thomas
Guest
|
 snapshot_root pruning
daily.0 -> deleted
daily.1 -> deleted
daily.2 -> renamed to daily.0
daily.3 -> renamed to daily.1
daily.4 -> renamed to daily.2
daily.5 -> renamed to daily.3
Yes, just remove (or rename) the ones that you don't want and move the others into their place(s).
Jeffrey
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
|
| Wed Jan 27, 2010 3:25 pm |
|
 |
Nico Kadel-Garcia
Guest
|
 snapshot_root pruning
On Wed, Jan 27, 2010 at 4:29 PM, Jeffrey G Thomas
<Jeffrey.Thomas < at > sierra-bravo.com> wrote:
daily.0 -> deleted
daily.1 -> deleted
daily.2 -> renamed to daily.0
daily.3 -> renamed to daily.1
daily.4 -> renamed to daily.2
daily.5 -> renamed to daily.3
Yes, just remove (or rename) the ones that you don't want and move the others into their place(s).
Jeffrey
I suggest not. The issue is that while daily.0 and daily. are being
deleted, there's nothing here to prevent rsnapshot from running and
creating chaos and a ruined backup. Try this instead. It could use
better trap handling and a more intelligent loop, but it should serve
to keep you from stepping on an active rsnapshot.
#!/bin/sh
LOCKFILE=/var/run/rsnapshot.pid
if [ -e $LOCKFILE ]; then
echo Error: $LOCKFILE exists, exiting
exit 1
else
echo $$ > $LOCKFILE || exit 1
fi
echo Rotating out daily.0
/bin/mv daily.0 daily.0.delete
/bin/mv daily.1 daily.0
/bin/mv daily.2 daily.1
/bin/mv daily.3 daily.2
/bin/mv daily.4 daily.3
/bin/mv daily.5 daily.4
echo Flushing old dadily.0 entirely
/bin/rm -rf daily.0.delete
/bin/rm -f $LOCKFILE
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
|
| Wed Jan 27, 2010 5:24 pm |
|
 |
David M. Besonen
Guest
|
 snapshot_root pruning
On 1/27/2010 5:23 PM, Nico Kadel-Garcia wrote:
I suggest not. The issue is that while daily.0 and daily.
are being deleted, there's nothing here to prevent
rsnapshot from running and creating chaos and a ruined
backup.
thanks for your suggestion. i was however planning on
pausing the rsnapshot automation.
out of curiosity, what's the worst thing that could happen if
rsnapshot ran unexpectedly? wouldn't any trouble be
contained within daily.0 and/or daily.1? does rsnapshot ever
mod anything older than daily.1?
thanks,
david
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
|
| Thu Jan 28, 2010 12:41 am |
|
 |
Michael Sternberg
Guest
|
 snapshot_root pruning
You'd have an rm and an rsync write process working on the same
directory tree - not good on general principles.
At a minimum, daily.0 will be incomplete. Further, after it has been
rotated up to daily.1 then --link-dest in the next round will miss
files that may have been candidates for hard links, thereby wasting
space on the backup medium. That may bust its capacity, leading to
rollbacks, and you'd be stuck without a current backup unless you
intervene. Enough?
Michael
On Jan 28, 2010, at 2:40, "David M. Besonen" <davidb < at > panix.com> wrote:
On 1/27/2010 5:23 PM, Nico Kadel-Garcia wrote:
I suggest not. The issue is that while daily.0 and daily.
are being deleted, there's nothing here to prevent
rsnapshot from running and creating chaos and a ruined
backup.
thanks for your suggestion. i was however planning on
pausing the rsnapshot automation.
out of curiosity, what's the worst thing that could happen if
rsnapshot ran unexpectedly? wouldn't any trouble be
contained within daily.0 and/or daily.1? does rsnapshot ever
mod anything older than daily.1?
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
|
| Thu Jan 28, 2010 1:44 am |
|
 |
Helmut Hullen
Guest
|
 snapshot_root pruning
Hallo, David,
Du meintest am 28.01.10:
thanks for your suggestion. i was however planning on
pausing the rsnapshot automation.
out of curiosity, what's the worst thing that could happen if
rsnapshot ran unexpectedly?
As far as I can see: nothing really bad.
The "hourly" jobs may run without disturbing the "daily" backups in any
way.
And the "daily" cronjobs should run early in the morning - no time for
changing them manually.
Or is - in your system - "daily" the lowest backup job, don't you run an
"hourly" backup?
wouldn't any trouble be contained within daily.0 and/or daily.1? does
rsnapshot ever mod anything older than daily.1?
What do you mean with "mod"? My dictionary doesn't give a reasonable
translation.
Viele Gruesse!
Helmut
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
|
| Thu Jan 28, 2010 2:25 am |
|
 |
Nico Kadel-Garcia
Guest
|
 snapshot_root pruning
On Thu, Jan 28, 2010 at 4:11 AM, Michael Sternberg <sternberg < at > anl.gov> wrote:
You'd have an rm and an rsync write process working on the same
directory tree - not good on general principles.
At a minimum, daily.0 will be incomplete. Further, after it has been
rotated up to daily.1 then --link-dest in the next round will miss
files that may have been candidates for hard links, thereby wasting
space on the backup medium. That may bust its capacity, leading to
rollbacks, and you'd be stuck without a current backup unless you
intervene. Enough?
Also, any after-backup reports on churn between the new daily.1 and
the new daily.0 will be broken.
There is a way to restorethe hardlinks, but it's a serious pain and
has to be done all the way down the set of backup targets
/bin/cp -al daily.1 daily.merge
rsync -avH daily.1/ daily.0.merge/ --delete # just to double
check, in case of "cp syntax errors
rsync -avH --delete daily.0/ daily.0.merge/
/bin/mv daily.0 daily.discard
/bin/mv daily.discard daily.0
with similar caveats as previously about avoiding rsnapshot in operation.
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
|
| Thu Jan 28, 2010 2:36 am |
|
 |
Håkon Løvdal
Guest
|
 snapshot_root pruning
On 28 January 2010 10:11, Helmut Hullen <Hullen < at > t-online.de> wrote:
does rsnapshot ever mod anything older than daily.1?
What do you mean with "mod"? My dictionary doesn't give a reasonable
translation.
Mod is short for modify I assume.
BR Håkon Løvdal
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
|
| Thu Jan 28, 2010 2:42 am |
|
 |
Helmut Hullen
Guest
|
 snapshot_root pruning
Hallo, Nico,
Du meintest am 28.01.10:
There is a way to restore the hardlinks, but it's a serious pain and
has to be done all the way down the set of backup targets
/bin/cp -al daily.1 daily.merge
rsync -avH daily.1/ daily.0.merge/ --delete # just to double
check, in case of "cp syntax errors
rsync -avH --delete daily.0/ daily.0.merge/
/bin/mv daily.0 daily.discard
/bin/mv daily.discard daily.0
with similar caveats as previously about avoiding rsnapshot in
operation.
I prefer the program "hardlink" from Dag Wieers:
<http://helmut.hullen.de/filebox/Linux/slackware/ap/hardlink-1.2-i486-1hln.tgz>
Ok - it has to be run at times when no regular rsnapshot run is running,
and it has to be finished before a regular rsnapshot run is started.
Viele Gruesse!
Helmut
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
|
| Thu Jan 28, 2010 2:55 am |
|
 |
David M. Besonen
Guest
|
 snapshot_root pruning
On 1/28/2010 1:11 AM, Helmut Hullen wrote:
Or is - in your system - "daily" the lowest backup job,
don't you run an "hourly" backup?
yes, in this system daily is the lowest.
wouldn't any trouble be contained within daily.0 and/or
daily.1? does rsnapshot ever mod anything older than
daily.1?
What do you mean with "mod"? My dictionary doesn't give a
reasonable translation.
mod = modification
-- david
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
|
| Thu Jan 28, 2010 7:24 am |
|
 |
Helmut Hullen
Guest
|
 snapshot_root pruning
Hallo, David,
Du meintest am 28.01.10:
Or is - in your system - "daily" the lowest backup job,
don't you run an "hourly" backup?
yes, in this system daily is the lowest.
Ok - then you need in this special case two "rollbacks". A very simple
script may do the job.
- delete (or first rename) daily.0
- renumber daily.1 to daily.x
- if first renamed: delete
Viele Gruesse!
Helmut
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
|
| Thu Jan 28, 2010 9:16 am |
|
 |
David M. Besonen
Guest
|
 snapshot_root pruning
On 1/28/2010 2:35 AM, Nico Kadel-Garcia wrote:
On Thu, Jan 28, 2010 at 4:11 AM, Michael Sternberg
<sternberg < at > anl.gov> wrote:
At a minimum, daily.0 will be incomplete. Further,
after it has been rotated up to daily.1 then --link-dest
in the next round will miss files that may have been
candidates for hard links, thereby wasting space on the
backup medium. That may bust its capacity, leading to
rollbacks, and you'd be stuck without a current backup
unless you intervene. Enough?
Also, any after-backup reports on churn between the new
daily.1 and the new daily.0 will be broken.
There is a way to restorethe hardlinks, but it's a serious
pain and has to be done all the way down the set of backup
targets
i'm not understanding "all the way down the set of backup
targets" but it does sound like you are talking about
actually fixing daily.0 and daily.1. assuming this is what
you are describing i'd rather just delete the corrupted backups.
so, given this type of problem wouldn't the simplest and
safest solution to cleaning up the mess be to delete daily.0
& daily.1 and rename what's remaining (assuming only daily no
hourly, weekly, or monthly backups)?
for my clarity of mind, rsnapshot only performs write
operations on the backup on which it is working, correct?
-- david
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
|
| Thu Jan 28, 2010 11:59 am |
|
 |
David M. Besonen
Guest
|
 snapshot_root pruning
On 1/28/2010 9:06 AM, Helmut Hullen wrote:
Hallo, David,
Du meintest am 28.01.10:
Or is - in your system - "daily" the lowest backup
job, don't you run an "hourly" backup?
yes, in this system daily is the lowest.
Ok - then you need in this special case two "rollbacks". A
very simple script may do the job.
- delete (or first rename) daily.0
- renumber daily.1 to daily.x
- if first renamed: delete
to make sure i'm understanding, your above example is
describing the following:
daily.0 -> delete
daily.1 -> delete
daily.2 -> rename to daily.0
daily.3 -> rename to daily.1
daily.4 -> rename to daily.2
daily.5 -> rename to daily.3
correct?
-- david
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
|
| Thu Jan 28, 2010 12:06 pm |
|
 |
Helmut Hullen
Guest
|
 snapshot_root pruning
Hallo, David,
Du meintest am 28.01.10:
Ok - then you need in this special case two "rollbacks". A
very simple script may do the job.
- delete (or first rename) daily.0
- renumber daily.1 to daily.x
- if first renamed: delete
to make sure i'm understanding, your above example is
describing the following:
daily.0 -> delete
daily.1 -> delete
daily.2 -> rename to daily.0
daily.3 -> rename to daily.1
daily.4 -> rename to daily.2
daily.5 -> rename to daily.3
correct?
No.
Most times it's enough to roll back one time. That's the job for a
simple script.
You need to "roll back one time" two times.
If you need this roll back only this one time and never more then you
can do as you have described, completely manually.
But if you want to use the existent hardlinks then it may be enough to
- delete daily.0
- delete daily.1
- rename daily.2 to daily.0
- wait for the next regular rsnapshot run
- re-rename daily.1 to daily.3
Viele Gruesse!
Helmut
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
|
| Thu Jan 28, 2010 12:31 pm |
|
 |
David M. Besonen
Guest
|
 snapshot_root pruning
On 1/28/2010 12:29 PM, Helmut Hullen wrote:
Most times it's enough to roll back one time. That's the
job for a simple script.
You need to "roll back one time" two times.
If you need this roll back only this one time and never
more then you can do as you have described, completely
manually.
i'm realizing that i have not understood some of the nuances
of rsnapshot's managemant of hardlinks.
could you explain in more detail the reasons that necessitate
either one or two rollbacks and if the need to rollback
occurs "only this one time and never more" then manual
pruning is ok (otherwise, it is not?)?
But if you want to use the existent hardlinks
i do.
then it may be enough to
- delete daily.0
- delete daily.1
- rename daily.2 to daily.0
- wait for the next regular rsnapshot run
- re-rename daily.1 to daily.3
so after deleting daily.0 and daily.1, and then renaming
daily.2 to daily.0 the snapshot_root should look like this:
daily.0
daily.3
daily.4
daily.5
and after rsnapshot runs once and i rename daily.1 to daily.3
the snapshot_root should look like this:
daily.0
daily.3
daily.4
daily.5
daily.6
and then if i run rsnapshot again, the rsnapshot_root should
look like this:
daily.0
daily.1
daily.4
daily.5
daily.6
correct? in other words, the missing two backup "holes" keep
getting older and older.
apologies to the list if i'm boring lots of people with
simpler than average questions and examples. i just really
want to understand this well.
thanks,
david
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
|
| Thu Jan 28, 2010 2:46 pm |
|
 |
|
|
The time now is Sat Feb 11, 2012 5:02 am | All times are GMT - 8 Hours
|
Page 1 of 2
|
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
|
|
|