Bacula-users

Re: [Bacula-users] How to restore all files under a given directory

2010-11-26 13:50:09
Subject: Re: [Bacula-users] How to restore all files under a given directory
From: Dan Langille <dan AT langille DOT org>
To: Joseph Spenner <joseph85750 AT yahoo DOT com>
Date: Fri, 26 Nov 2010 13:46:47 -0500
On 11/26/2010 11:51 AM, Joseph Spenner wrote:
> --- On Fri, 11/26/10, Win Htin<win.htin AT gmail DOT com>  wrote:
>
>> Hi folks,
>>
>> I am running Bacula version 2.2.6 and am wondering how I
>> can restore
>> all files/sub-directories under a given directory since I
>> do not know
>> exactly what files/sub-directories are under that
>> directory. The only
>> options I can see from the bconsole "restore" commands
>> are:
>>
>> 1: List last 20 Jobs run
>>       2: List Jobs where a given File is
>> saved
>>       3: Enter list of comma separated
>> JobIds to select
>>       4: Enter SQL list command
>>       5: Select the most recent backup
>> for a client
>>       6: Select backup for a client
>> before a specified time
>>       7: Enter a list of files to
>> restore
>>       8: Enter a list of files to
>> restore before a specified time
>>       9: Find the JobIds of the most
>> recent backup for a client
>>      10: Find the JobIds for a backup for a client
>> before a specified time
>>      11: Enter a list of directories to restore
>> for found JobIds
>>      12: Cancel
>
> I would run 'bat', figure out the job ID of the jobs you need to restore, 
> then go into the 'restore' menu above and use option 3 to enter all those 
> IDs.  Then when finished, you 'add' the directory; it should be visible to be 
> added.

I suggest trying #5, if that applies.  At some point, you will see 
something this:


####
Building directory tree for JobId(s) 
39677,40041,40067,40095,40141,40190,40233 ... 
+++++++++++++++++++++++++++++++++++++++++++++++
4,115 files inserted into the tree.

You are now entering file selection mode where you add (mark) and
remove (unmark) files to be restored. No files are initially added, unless
you used the "all" keyword on the command line.
Enter "done" to leave this mode.

cwd is: /
$
####

 From there, follow your nose:

$ ls
boot/
etc/
root/
usr/
var/
$ cd var
cwd is: /var/
$ ls
cron/
db/
log/
$ mark db
107 files marked.
$ done
Bootstrap records written to /home/bacula/working/bacula-dir.restore.1.bsr

The job will require the following
    Volume(s)                 Storage(s)                SD Device(s)
===========================================================================

     FileAuto-1226             MegaFile                  MegaFile
     FileAuto-1305             MegaFile                  MegaFile

Volumes marked with "*" are online.


107 files selected to be restored.

Run Restore job
JobName:         RestoreFiles
Bootstrap:       /home/bacula/working/bacula-dir.restore.1.bsr
Where:           /tmp/bacula-restores
Replace:         always
FileSet:         Full Set
Backup Client:   bast-fd
Restore Client:  bast-fd
Storage:         MegaFile
When:            2010-11-26 18:45:48
Catalog:         MyCatalog
Priority:        10
Plugin Options:  *None*
OK to run? (yes/mod/no):
###

In this case, I'm restoring everything under /var/db

Hope that helps.





-- 
Dan Langille - http://langille.org/

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users