 |
|
 |
|
Next: [PATCH] Define alignment macros in "align.h&..
|
| Author |
Message |
External

Since: Nov 04, 2008 Posts: 41
|
(Msg. 1) Posted: Wed Aug 19, 2009 11:23 am
Post subject: Use logrotate to flush old backup snapshots? Archived from groups: comp>os>linux>setup (more info?)
|
|
|
I've got a serup that pushes small nightly backups snapshots, numbered
as follows, to a remote server.
* host.tar.gz
* host.1.tar.gz
* host.2.tar.gz
* host.3.tar.gz
etc., etc.
It's unforunately confusing, on the target backup server, to sort out
which is from which date. I'd prefer to have the tool build as
follows:
* host.20090101.tar.gz
* host.20090102.tar.gz
etc., etc.
Then I could, theoretically, allow logrotate to flush anything over a
week old on the local host, or on the remote target the files get
pushed to. But I'd like a clean logrotate file to basically leave
everything in the target directory alone, and just delete anything
over a week old.
Does anyone have one? Or do I need to roll my own? |
|
| Back to top |
|
 |  |
External

Since: Nov 04, 2008 Posts: 41
|
(Msg. 2) Posted: Wed Aug 19, 2009 6:03 pm
Post subject: Re: Use logrotate to flush old backup snapshots? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Aug 19, 6:21 pm, Unruh <unruh-s... DeleteThis @physics.ubc.ca> wrote:
> Nico Kadel-Garcia <nka... DeleteThis @gmail.com> writes:
> >I've got a serup that pushes small nightly backups snapshots, numbered
> >as follows, to a remote server.
> >* host.tar.gz
> >* host.1.tar.gz
> >* host.2.tar.gz
> >* host.3.tar.gz
> >etc., etc.
> >It's unforunately confusing, on the target backup server, to sort out
> >which is from which date. I'd prefer to have the tool build as
>
> ls -l filename
> newer filename1 filename2
Yes, and that's an extra and entirely unnecessary step. In particular,
if you push these files to a tape backup system and attempt to recover
them, which particular "host.1.tar.gz" to you want, and where should
you restore it to? Whoops, I just overwrote one with the other date's
file!
Trust me on this: date-stamping backup repositories is extremely
useful. Frankly, I wish rsnapshot supported it as well.
> >follows:
> >* host.20090101.tar.gz
> >* host.20090102.tar.gz
>
> That can be worse-- then you have determine which date is older or newer.
What? '20090101" is January first, 2009. 20090102 is January second,
etc. The date stamps are very handy when trying to recover components
from particular dates, or for comparing the differences over time.
> >etc., etc.
> >Then I could, theoretically, allow logrotate to flush anything over a
> >week old on the local host, or on the remote target the files get
> >pushed to. But I'd like a clean logrotate file to basically leave
> >everything in the target directory alone, and just delete anything
> >over a week old.
>
> find . -mtime +7 -exec rm \{\}\;
>
> >Does anyone have one? Or do I need to roll my own?
>
> Many exist. See examples above.
Yes, I know how to write find scripts. I was looking for a logrotate.d
file, such as someone with a similar policy of doing MySQL or other
tarball backups might have used. |
|
| Back to top |
|
 |  |
External

Since: Aug 14, 2005 Posts: 224
|
(Msg. 3) Posted: Wed Aug 19, 2009 7:20 pm
Post subject: Re: Use logrotate to flush old backup snapshots? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Nico Kadel-Garcia <nkadel.TakeThisOut@gmail.com> writes:
>I've got a serup that pushes small nightly backups snapshots, numbered
>as follows, to a remote server.
>* host.tar.gz
>* host.1.tar.gz
>* host.2.tar.gz
>* host.3.tar.gz
>etc., etc.
>It's unforunately confusing, on the target backup server, to sort out
>which is from which date. I'd prefer to have the tool build as
ls -l filename
newer filename1 filename2
>follows:
>* host.20090101.tar.gz
>* host.20090102.tar.gz
That can be worse-- then you have determine which date is older or newer.
>etc., etc.
>Then I could, theoretically, allow logrotate to flush anything over a
>week old on the local host, or on the remote target the files get
>pushed to. But I'd like a clean logrotate file to basically leave
>everything in the target directory alone, and just delete anything
>over a week old.
find . -mtime +7 -exec rm \{\}\;
>Does anyone have one? Or do I need to roll my own?
Many exist. See examples above. |
|
| Back to top |
|
 |  |
External

Since: Aug 14, 2005 Posts: 224
|
(Msg. 4) Posted: Thu Aug 20, 2009 3:22 am
Post subject: Re: Use logrotate to flush old backup snapshots? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
You apparently do not want any help.
Nico Kadel-Garcia <nkadel.DeleteThis@gmail.com> writes:
>On Aug 19, 6:21=A0pm, Unruh <unruh-s....DeleteThis@physics.ubc.ca> wrote:
>> Nico Kadel-Garcia <nka....DeleteThis@gmail.com> writes:
>> >I've got a serup that pushes small nightly backups snapshots, numbered
>> >as follows, to a remote server.
>> >* host.tar.gz
>> >* host.1.tar.gz
>> >* host.2.tar.gz
>> >* host.3.tar.gz
>> >etc., etc.
>> >It's unforunately confusing, on the target backup server, to sort out
>> >which is from which date. I'd prefer to have the tool build as
>>
>> ls -l filename
>> newer filename1 filename2
>Yes, and that's an extra and entirely unnecessary step. In particular,
>if you push these files to a tape backup system and attempt to recover
>them, which particular "host.1.tar.gz" to you want, and where should
>you restore it to? Whoops, I just overwrote one with the other date's
>file!
>Trust me on this: date-stamping backup repositories is extremely
>useful. Frankly, I wish rsnapshot supported it as well.
>> >follows:
>> >* host.20090101.tar.gz
>> >* host.20090102.tar.gz
>>
>> That can be worse-- then you have determine which date is older or newer.
>What? '20090101" is January first, 2009. 20090102 is January second,
>etc. The date stamps are very handy when trying to recover components
>from particular dates, or for comparing the differences over time.
>> >etc., etc.
>> >Then I could, theoretically, allow logrotate to flush anything over a
>> >week old on the local host, or on the remote target the files get
>> >pushed to. But I'd like a clean logrotate file to basically leave
>> >everything in the target directory alone, and just delete anything
>> >over a week old.
>>
>> find . -mtime +7 -exec rm \{\}\;
>>
>> >Does anyone have one? Or do I need to roll =A0my own?
>>
>> Many exist. See examples above.
>Yes, I know how to write find scripts. I was looking for a logrotate.d
>file, such as someone with a similar policy of doing MySQL or other
>tarball backups might have used. |
|
| Back to top |
|
 |  |
|
You can post new topics in this forum You can 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
|
|
|
|
 |
|
|