Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Use logrotate to flush old backup snapshots?

 
   Soft32 Home -> Linux -> Setup RSS
Next:  [PATCH] Define alignment macros in "align.h&..  
Author Message
Nico Kadel-Garcia

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
Login to vote
Nico Kadel-Garcia

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
Login to vote
Unruh

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
Login to vote
Unruh

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
Login to vote
Display posts from previous:   
Related Topics:
Using VMWare to boot linux patition. - Hi, I regularly switch between winxp pro and mandrake 10.2. Lately this has become a bit of a pain so I looked into..

Problems with fonts rendering under ubuntu feisty ?! - hello my laptop mount an ATI mobility radeon 9700 , my screen resolution is 1280x800 I trying to set the correct..

The out-of-memory killer. - What can a process do to insure that it is the process which dies when the system runs out of memory. (This is as..

[PATCH] tty flush flip buffer on ldisc input queue flush - Flush the tty flip buffer when the line discipline input queue is flushed, including the user call..

Unstable snapshots - From: www.d.o/CD/ "(Snapshots of the "testing" and "unstable" distributions are created weekl...

no more git snapshots? - Just wondering: the last git snapshot is -rc3-git7 from 04.06.2007, have they been discontinued or is some magic scrip...
       Soft32 Home -> Linux -> Setup All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
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

Categories:
 Windows
  Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]