Bacula-users

Re: [Bacula-users] Deleting files/folders on restores

2010-04-01 10:25:33
Subject: Re: [Bacula-users] Deleting files/folders on restores
From: Matija Nalis <mnalis+bacula AT CARNet DOT hr>
To: Marco Zimmermann <mzimmermann AT habegger DOT ch>
Date: Thu, 1 Apr 2010 16:23:11 +0200
On Thu, Apr 01, 2010 at 03:00:00PM +0200, Marco Zimmermann wrote:
> Am 01.04.10 14:24 schrieb "Matija Nalis" unter <mnalis+bacula AT CARNet DOT 
> hr>:
> > Oh, I see. So the problem you have is happening only when you restore
> > to the same client and the same place you did a backup from ?
> 
> Yes, correct, only if I restore to the same directory.
> If I restore to another directory, every thing works fine.

ok

> You're right, that's the point. I thought that there has to be an option to
> control the behavior of deleting files/folder they don't belong to the
> restored set of data.

No, as far as I know there is no such option in bacula at this time...

> My Problem is, that I maybe want to restore the whole system to role back to
> a certain point of my installation/configuration. So I don't know where the
> files have changed/been added and where not (e.g. If I update/upgrade the
> whole system, something goes wrong, an I want to roll back to the point
> before the update). Do you know what I mean? I don't think that I am the

Yes, I understand. I usually prefer to do that via LVM snapshots
(*much* faster than full restore).

However, if I need to restore whole machine to previous state from
bacula tape backup, I boot from rescue USB stick (with static
bacula-fd on it), nuke all data (mkfs all partitions is fastest way),
and then do the full restore (note: on full restores, you always have
to watch out to reinitialize the boot loader at the end, or you could
end up with unbootable machine, which means more downtime)

http://www.bacula.org/en/dev-manual/Disast_Recove_Using_Bacula.html

There are alternatives -- you can restore everything to some subdir
like '/RESTORE', and then delete or move all old stuff ('/*', except
'/RESTORE' of course) and then move restored stuff to right locations
- but you should use statically linked tools for that operations or
things will break when /lib and similar directories disappears). 
I do that for example if I do not have physical access to the machine
(in which case one has to be very careful :)

> only one who has this demand! So I don't can script it I guess...

I need that very rarely though (I usually test upgrades on virtualized 
test instances first) so the booting from USB is not the issue for me, 
but I can see your problem (when it is full system we're talking about, 
than you can't easily do "rm -rf /" and then run a restore; but you 
need to boot from CD or USB or something first which is somewhat
inconvenient)

So such a feature ("accurate restore", eg. nuking all files in
specified restore directory not present in restore fileset) might be
nice, but not nearly cruical (you still need to make your USB recover
stick with bacula anyway in case your machine dies and you need to do
full restore with nothing of the old machine left, and that is the
most of work).

However, if you do such restores very often and think it is important, 
you could submit a feature request as described on:
http://www.bacula.org/en/?page=feature-request


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>