Bacula-users

Re: [Bacula-users] Restoring files on a different system

2014-11-24 06:08:05
Subject: Re: [Bacula-users] Restoring files on a different system
From: Nils Jungebluth <Nils.Jungebluth AT tellja DOT de>
To: Ana Emília M. Arruda <emiliaarruda AT gmail DOT com>
Date: Mon, 24 Nov 2014 10:58:51 +0000
Hi again,

so I just tried that one again. But the result is the same.
I renamed the LTO-2 drive to simply "Tapedrive" and startet the restore job.
This is the output from bacula:

24-Nov 11:44 backup-dir JobId 36005: Start Restore Job RestoreFiles.2014-11-24_11.44.24_03
24-Nov 11:44 backup-dir JobId 36005: Using Device "Tapedrive" to read.
24-Nov 11:44 backup-sd JobId 36005: Ready to read from volume "AAJ00109" on tape device "Tapedrive" (/dev/nst0).
24-Nov 11:44 backup-sd JobId 36005: Forward spacing Volume "AAJ00109" to file:block 27:0.
24-Nov 11:44 backup-sd JobId 36005: End of Volume at file 0 on device "Tapedrive" (/dev/nst0), Volume "AAJ00109"
24-Nov 11:44 backup-sd JobId 36005: End of all volumes.
24-Nov 11:44 backup-sd JobId 36005: Elapsed time=00:00:22, Transfer rate=0  Bytes/second
24-Nov 11:44 backup-dir JobId 36005: Bacula backup-dir 7.0.5 (28Jul14):
  Build OS:               x86_64-unknown-linux-gnu debian 7.2
  JobId:                  36005
  Job:                    RestoreFiles.2014-11-24_11.44.24_03
  Restore Client:         telljadb2-fd
  Start time:             24-Nov-2014 11:44:26
  End time:               24-Nov-2014 11:44:52
  Files Expected:         1,633
  Files Restored:         0
  Bytes Restored:         0
  Rate:                   0.0 KB/s
  FD Errors:              0
  FD termination status:  OK
  SD termination status:  OK
  Termination:            Restore OK -- warning file count mismatch

24-Nov 11:44 backup-dir JobId 36005: Begin pruning Jobs older than 12 months .
24-Nov 11:44 backup-dir JobId 36005: No Jobs found to prune.
24-Nov 11:44 backup-dir JobId 36005: Begin pruning Files.
24-Nov 11:44 backup-dir JobId 36005: No Files found to prune.
24-Nov 11:44 backup-dir JobId 36005: End auto prune.

I really don't get why it's not working properly.


-------------------------------------------------------
kind regards/Mit freundlichen Gruessen                                                                                                                                                                     
Nils Jungebluth
System-/Netzwerkadministrator

Tellja GmbH
Solmsstr. 12
D-60486 Frankfurt am Main
Fon: +49 (0)69 8700 429 - 21
Email nils.jungebluth AT tellja DOT de

Geschäftsführer: Jens Rode, Michael Stöhr
Sitz der Gesellschaft: Frankfurt am Main
Amtsgericht Frankfurt am Main HRB 76290 


Von: Ana Emília M. Arruda
Gesendet: Montag, 17. November 2014 17:58
An: Nils Jungebluth
Betreff: Re: [Bacula-users] Restoring files on a different system

Hi Nils,

Sorry for the first line. I did a mistake with languages... So sorry.

Best regards,
Ana

On Mon, Nov 17, 2014 at 1:57 PM, Ana Emília M. Arruda <emiliaarruda AT gmail DOT com> wrote:
Hi Nils,

When you define a new device en el bacula-sd.conf, en el database

When you define a new device in the bacula-sd.conf, it is created a new device in the database, with its StorageId, Name and AutoChanger flag.

This way, what you did is that you have two entries for the same "LTO-2" name devices but with two different StorageId. There is no need for 'update Storage set AutoChanger=0 where Name="LTO-2";'.

I would suggest you that you put another name for the new stand alone tape drive, LTO2-tape, for example, in your bacula-sd.conf and in the storage definition in bacula-dir.conf. And when doing the restore, use this new device normally. It should work.

Best regards,
Ana

On Mon, Nov 17, 2014 at 10:49 AM, Nils Jungebluth <Nils.Jungebluth AT tellja DOT de> wrote:
Hi Ana,

No I have 2 seperate setups. The first one is in our datacenter and is attached to the Tape Library. And in case that one burns down I have to restore those tapes.
Therefor I have a second setup with a different Tapedrive in our office. The drive here in our office is just a single slot drive and not an autochanger library.
So I have 2 completely environments. 

The suggested solution from the documentation in case of an emergency is copy the configfiles, database, bootstraps etc. to the new machine, then alter the config/database to accomodate for different storage devices
and then restore your files.

In the database I altered the autochanger value for the Storage device, because it wouldn't  do so when only altered in the bacula-sd.conf
'update Storage set AutoChanger=0 where Name="LTO-2";'


Here I changed the Storagedevice from Libraryautochanger to single slot drive:
-------------------------------------------------------------------------
Storage {                             # definition of myself
  Name = backup-sd
  SDPort = 9103                  # Director's port      
  WorkingDirectory = "/usr/local/var/bacula/working"
  Pid Directory = "/var/run"
  Maximum Concurrent Jobs = 20
}

Director {
  Name = backup-dir
  Password = "bc_sd!A11"
}

Director {
  Name = backup-mon
  Password = "nRkJFVTjyoOiRa0TR5Mq11hyxLyamiZ3aOiH/g5fLpRq"
  Monitor = yes
}

## Old config Part

#Autochanger {
#  Name = LTO-2
#  Device = LTO-2-Drive
#  Changer Device = /dev/sg2
#  Changer Command = "/usr/local/etc/mtx-changer %c %o %S %a %d"
#}


#Device {
#  Name = LTO-2-Drive
#  Drive Index = 0
#  Media Type = LTO-2
#  Archive Device = /dev/nst0
# Maximum Changer Wait = 3d
#  AutomaticMount = yes
#  AlwaysOpen = yes
# RemovableMedia = yes
# RandomAccess = no
# Maximum File Size = 4GB
# Autochanger = yes
#}
##

Device {
  Name = LTO-2
  Media Type = LTO-2 
  Archive Device = /dev/nst0
  AutomaticMount = yes;               # when device opened, read it
  AlwaysOpen = yes;
  RemovableMedia = yes;
  RandomAccess = no;   
  Maximum File Size = 4GB
}

#-------------------------

Messages {
  Name = Standard
  director = backup-dir = all
}

----------------------------------------------------------------------------

I can give you the log of the last restorejob or do you mean something else?

03-Nov 12:08 backup-dir JobId 36001: Start Restore Job RestoreFiles.2014-11-03_12.08.56_35
03-Nov 12:08 backup-dir JobId 36001: Using Device "LTO-2" to read.
03-Nov 12:09 backup-sd JobId 36001: Ready to read from volume "AAJ00109" on tape device "LTO-2" (/dev/nst0).
03-Nov 12:09 backup-sd JobId 36001: Forward spacing Volume "AAJ00109" to file:block 27:0.
03-Nov 12:09 backup-sd JobId 36001: End of Volume at file 0 on device "LTO-2" (/dev/nst0), Volume "AAJ00109"
03-Nov 12:09 backup-sd JobId 36001: End of all volumes.
03-Nov 12:09 backup-sd JobId 36001: Elapsed time=00:00:21, Transfer rate=0  Bytes/second
03-Nov 12:09 backup-dir JobId 36001: Bacula backup-dir 7.0.5 (28Jul14):
  Build OS:               x86_64-unknown-linux-gnu debian 7.2
  JobId:                  36001
  Job:                    RestoreFiles.2014-11-03_12.08.56_35
  Restore Client:         telljadb2-fd
  Start time:             03-Nov-2014 12:08:58
  End time:               03-Nov-2014 12:09:24
  Files Expected:         83
  Files Restored:         0
  Bytes Restored:         0
  Rate:                   0.0 KB/s
  FD Errors:              0
  FD termination status:  OK
  SD termination status:  OK
  Termination:            Restore OK -- warning file count mismatch

03-Nov 12:09 backup-dir JobId 36001: Begin pruning Jobs older than 12 months .
03-Nov 12:09 backup-dir JobId 36001: No Jobs found to prune.
03-Nov 12:09 backup-dir JobId 36001: Begin pruning Files.
03-Nov 12:09 backup-dir JobId 36001: No Files found to prune.
03-Nov 12:09 backup-dir JobId 36001: End auto prune.

03-Nov 12:20 backup-dir JobId 36002: Start Restore Job RestoreFiles.2014-11-03_12.20.35_15
03-Nov 12:20 backup-dir JobId 36002: Using Device "LTO-2" to read.
03-Nov 12:20 backup-sd JobId 36002: Ready to read from volume "AAJ00109" on tape device "LTO-2" (/dev/nst0).
03-Nov 12:20 backup-sd JobId 36002: Forward spacing Volume "AAJ00109" to file:block 27:0.
03-Nov 12:21 backup-sd JobId 36002: End of Volume at file 0 on device "LTO-2" (/dev/nst0), Volume "AAJ00109"
03-Nov 12:21 backup-sd JobId 36002: End of all volumes.
03-Nov 12:21 backup-sd JobId 36002: Elapsed time=00:00:22, Transfer rate=0  Bytes/second
03-Nov 12:21 backup-dir JobId 36002: Bacula backup-dir 7.0.5 (28Jul14):
  Build OS:               x86_64-unknown-linux-gnu debian 7.2
  JobId:                  36002
  Job:                    RestoreFiles.2014-11-03_12.20.35_15
  Restore Client:         telljadb2-fd
  Start time:             03-Nov-2014 12:20:37
  End time:               03-Nov-2014 12:21:04
  Files Expected:         1,633
  Files Restored:         0
  Bytes Restored:         0
  Rate:                   0.0 KB/s
  FD Errors:              0
  FD termination status:  OK
  SD termination status:  OK
  Termination:            Restore OK -- warning file count mismatch

03-Nov 12:21 backup-dir JobId 36002: Begin pruning Jobs older than 12 months .
03-Nov 12:21 backup-dir JobId 36002: No Jobs found to prune.
03-Nov 12:21 backup-dir JobId 36002: Begin pruning Files.
03-Nov 12:21 backup-dir JobId 36002: No Files found to prune.
03-Nov 12:21 backup-dir JobId 36002: End auto prune.

Thanks again


-------------------------------------------------------
kind regards/Mit freundlichen Gruessen                                                                                                                                                                     
Nils Jungebluth
System-/Netzwerkadministrator

Tellja GmbH
Solmsstr. 12
D-60486 Frankfurt am Main

Geschäftsführer: Jens Rode, Michael Stöhr
Sitz der Gesellschaft: Frankfurt am Main
Amtsgericht Frankfurt am Main HRB 76290 


Von: Ana Emília M. Arruda
Gesendet: Montag, 17. November 2014 12:40
An: Nils Jungebluth
Cc: bacula-users AT lists.sourceforge DOT net
Betreff: Re: [Bacula-users] Restoring files on a different system

Hello Nils,

Do you mean restore from the Tandberg Tape Library into another client machine (bacula-fd) or from another tape device into another client machine?

If you want to restore into another client you just need to define this new client machine in the director configuration and install bacula-fd in this new client.

I didn´t understand why you had to modify bacula database also. Could you post here what exactly you did in the database, the new configurations and the logs?

Best regards,
Ana

On Mon, Nov 17, 2014 at 7:58 AM, Nils Jungebluth <Nils.Jungebluth AT tellja DOT de> wrote:
Hello,


I hope someone can help me with a little problem.


The problem presents itself like this: I have set up a complete backupsystem with a Tandberg Tape Library (10 Slots)
in our datacenter. That works fine. Now i have to come up with a solution to restore the tapes on another machine here in our office.
I set up a bacula installation (bacula 7.0.5) with a single tapedrive using the configfiles from the original datacentersetup.
I altered the database and the configfiles to accomodate for the different tapedrive.
The restorejobs seem to work but I get this message: Termination: Restore OK -- warning file count mismatch
And no files are being restored. The files are definitely on the tape as shown by bls. 
I also checked and restored the whole tape with bextract but that just takes to long.


Any ideas? If you need more details (logs etc.) I should be able to provide those.


Help would be appreciated thanks in advance.

-------------------------------------------------------
kind regards/Mit freundlichen Gruessen
Nils Jungebluth
System-/Netzwerkadministrator

Tellja GmbH
Solmsstr. 12
D-60486 Frankfurt am Main
Fon: +49 (0)69 8700 429 - 21
Email nils.jungebluth AT tellja DOT de
Web   www.tellja.de

Geschäftsführer: Jens Rode, Michael Stöhr
Sitz der Gesellschaft: Frankfurt am Main
Amtsgericht Frankfurt am Main HRB 76290

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users



------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
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>