Arno Lehmann wrote:
> Hi,
> 
> On 5/28/2007 4:10 AM, Maria McKinley wrote:
>> Arno Lehmann wrote:
>>> Hi,
>>>
>>> On 5/25/2007 3:41 AM, Maria McKinley wrote:
>>>>   Hi there,
>>>>
>>>> I had some problems with my server, and had to move bacula to a
>>>> different machine. I have complete access to bacula on the old machine,
>>>> and moved the database and the config files. I changed the config files
>>>> so that I'm using the new file server hostname, but other than that they
>>>> are the same. I have the old database in my home directory.
>>> Wait a moment... I'm not sure about the catalog.
>>>
>>> When Bacula runs, does it use a catalog populated with the data from the 
>>> old server?
>>>
>>> If it doesn't, you should import the catalg data into the database. 
>>> (Having the database (which one? MySQL, PosthreSQL, SQLite... hopefully 
>>> as a full dump!) in your homedirectory usually doesn't help much.)
>>>
>>> If it does, you can simply look up the JobId for the jobs you need to 
>>> restore using either the restore command, the different queries, or even 
>>> the job reports.
>>>
>>>> I then
>>>> started to run the job RestoreFiles, but it asked for a JobId, and I
>>>> wasn't sure what to use for this. Does it matter?
>>> Absolutely. The JobId tells Bacula whch Job you want to restore.
>>>
>>>> I didn't see any
>>>> reference to this in the manual.
>>> Hmm... I think you should reread the Restore chapter and perhaps the 
>>> system outline :-)
>>>
>>> A Job is defined as a certain set of files from a certain client, plus 
>>> some options.
>>>
>>> Whenever Bacula runs a job, it saves the data specified like this. Such 
>>> a job instance gets a unique JobId.
>>>
>>> So, for a complete restore of a job, you need the job Ids of the latest 
>>> full, the latest differential backup after that full one, and any 
>>> incremental backups after that. This list of JobIds is then fed to the 
>>> restore process. Much of the selection can be done more or less 
>>> user-friendly with the initial queries of the restore command.
>>>
>>> Anyway, unless I somehow misunderstood you, I'd need some more details 
>>> regarding your problem - most important: is the catalog database 
>>> populated and shows all your existing backups, volumes, etc., and what 
>>> exactly do you want to restore?
>>>
>>> Arno
>> Thanks Arno,
>>
>> I see I am not being clear. What I really want to know is how I get the 
>> new bacula on the new machine to load the old database from the old 
>> machine. Can I just put the old database where the new one now is, or is 
>> there some way to import a database?
>>
> 
> 
> Ok, I now understand, I think...
> 
> The simplest way is when you will use the same catalog backend database. 
> In that case, create a complete dup of the catalog, and load that into 
> your new, unpopulated catalog.
> 
> With MySQl, this is done using mysqldump and mysql, SQLite should allow 
> you to copy the database files directly, and I'd have to look up how you 
> best do it with PostgreSQL.
> 
> After the catalg database is populated, simply point your new Bacula 
> installation to it.
> 
> Changing from one database to the other would probabaly need some 
> sed/awk to remove database-specific statements from the catalog dump.
> 
> Which database do you run?
> 
> Arno
> 

I run SQLite. I haven't tried this yet, since I have been out of town 
for an emergency until today. I'm going to try this tonight.

Thanks for the advice.

~maria

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to