Amanda-Users

Re: Q: prevent deleting existing files after recover a backup

2004-06-10 06:07:50
Subject: Re: Q: prevent deleting existing files after recover a backup
From: Paul Bijnens <paul.bijnens AT xplanation DOT com>
To: Sebastian Kösters <skoesters AT sino DOT de>
Date: Thu, 10 Jun 2004 11:49:51 +0200
Sebastian Kösters wrote:

When I recover a backup into a directory in which already files exist (others than in the Backup), Amanda deletes the existing files after the backup. I don’t want Amanda to do that.

Is it possible to prevent this?

There is difference when specifying to restore the directory, or
the files in it.
When you say to amrecover "add .", you specifyied you want to restore
the directory in the state as found on the backup.  Newer files
will be deleted.

If you want to restore some files, you may say to amrecover
"add these*", or some other pattern.
In this case newer files are NOT deleted.

Note that "add *" adds the directory itself too, resulting in deleting
newer files.  But "cd ..", followed by a "delete thedir" removes the
directory from the extraction list (and leaves the newer files untouched when restoring).
I do find this a bug, but have not yet got time to implement a fix.

When using "amrestore -p | ..."  it's up to you to specify what to
add in the extraction list.



--
Paul Bijnens, Xplanation                            Tel  +32 16 397.511
Technologielaan 21 bus 2, B-3001 Leuven, BELGIUM    Fax  +32 16 397.512
http://www.xplanation.com/          email:  Paul.Bijnens AT xplanation DOT com
***********************************************************************
* I think I've got the hang of it now:  exit, ^D, ^C, ^\, ^Z, ^Q, F6, *
* quit,  ZZ, :q, :q!,  M-Z, ^X^C,  logoff, logout, close, bye,  /bye, *
* stop, end, F3, ~., ^]c, +++ ATH, disconnect, halt,  abort,  hangup, *
* PF4, F20, ^X^X, :D::D, KJOB, F14-f-e, F8-e,  kill -1 $$,  shutdown, *
* kill -9 1,  Alt-F4,  Ctrl-Alt-Del,  AltGr-NumLock,  Stop-A,  ...    *
* ...  "Are you sure?"  ...   YES   ...   Phew ...   I'm out          *
***********************************************************************