Re: shell cript deleting backups
David Jardine <david@jardine.de> wrote:
| On Mon, Jun 06, 2005 at 07:20:06AM -0700, Alvin Oga wrote:
| >
| >
| > On Mon, 6 Jun 2005, mess-mate wrote:
| >
| > > Alvin Oga <aoga@mail.Linux-Consulting.com> wrote:
| > > |
| > > | save it as
| > > |
| > > | /backup/mon
| > > | /backup/tue
| > > | /backup/wed
| >
| > ...
| >
| > > But can't save as /backup/mon, etc.. There is nochoice about the
| > > backup name except the primairy name = 'Maildir', with konserve.
| > > 'Maildir' is directory ( ~/Maildir/INBOX.debian )
| >
| > there is always a choice ... too many gazillion choices.. its *unix*
| >
| > > I'm looking for a simple backup package independant of KDE.
| >
| > #
| > # whacky script for ~/Maildir
| > #
| > #
| > # for using date: 1, 2, 3, ... 30
| > # pkg=`date '+%d'`
| > #
| > # for using mon, tue, wed
| > # pkg=`date '+%a'`
| >
| > tar zcvf /backup/pkg.tgz /home/~/Maildir
|
| I'm always trying to learn something from you experts, but I
| don't understand the above command. Is it right? I would
| have expected
|
| tar zcvf /backup/pkg.tgz /home/*/Maildir
|
| to save everyone's files, or
|
| tar zcvf /backup/pkg.tgz ~/Maildir
|
| for a user to save his own files.
|
| Was it a typo, or is this my ignorance?
|
Yes it's a typo :)
Must be tar zcvf ~/Backups/Maildir-date '+%d'.tgz ~/Maildir
But the way i want is as follows:
Add number 1 to the backup file and when backup next that file,
delete the newer one(s) and restart with number 1.( the number 1
file will be automatically overwrite )
Say 1-maildir.tgz as first, the next backup verify if there are
newer (greater of nbr 1) and delete them first and recreate
with nbr 1 = 1-maildir.tgz.
(This incase if older backups wheren't deleted before )
mess-mate
--
You will be held hostage by a radical group.
Reply to: