*run A job name must be specified. The defined Job resources are: 1: BackupCatalog 2: RestoreFiles 3: MigrateDiskToTape 4: CopyMegaFileToTape 5: laptop 6: laptop-vpn 7: laptop-wifi-5.3 8: laptop-verify 9: laptop-websites 10: laptop-xp 11: wocker 12: bast basic 13: bast home 14: dbclone basic 15: dbclone home 16: polo basic 17: polo 18: kraken basic 19: kraken 20: nyi maildir 21: nyi maildir tarball 22: nyi basic 23: nyi 24: supernews basic 25: supernews 26: supernews maildir 27: ngaio basic 28: ngaio databases 29: ngaio 30: latens basic 31: latens home 32: testing 33: kraken tape Select Job resource (1-33): 33 Run Backup job JobName: kraken tape Level: Incremental Client: kraken-fd FileSet: small fileset Pool: Fulls (From Job resource) Storage: DigitalTapeLibrary (From Pool resource) When: 2010-11-23 20:26:35 Priority: 10 OK to run? (yes/mod/no): mod Parameters to modify: 1: Level 2: Storage 3: Job 4: FileSet 5: Client 6: When 7: Priority 8: Pool 9: Plugin Options Select parameter to modify (1-9): 1 Levels: 1: Full 2: Incremental 3: Differential 4: Since 5: VirtualFull Select level (1-5): 1 Run Backup job JobName: kraken tape Level: Full Client: kraken-fd FileSet: small fileset Pool: Fulls (From Job resource) Storage: DigitalTapeLibrary (From Pool resource) When: 2010-11-23 20:26:35 Priority: 10 OK to run? (yes/mod/no): yes Job queued. JobId=40124 *m 23-Nov 20:26 bacula-dir JobId 40124: Start Backup JobId 40124, Job=kraken_tape.2010-11-23_20.26.41_08 23-Nov 20:26 kraken-sd JobId 40124: 3307 Issuing autochanger "unload slot 10, drive 0" command. *m 23-Nov 20:27 bacula-dir JobId 40124: Using Device "DTL01" 23-Nov 20:27 kraken-sd JobId 40124: Invalid slot=0 defined in catalog for Volume "DGG465" on "DTL01" (/dev/nsa0). Manual load may be required. 23-Nov 20:27 kraken-sd JobId 40124: 3301 Issuing autochanger "loaded? drive 0" command. 23-Nov 20:27 kraken-sd JobId 40124: 3302 Autochanger "loaded? drive 0", result: nothing loaded. 23-Nov 20:27 kraken-sd JobId 40124: 3301 Issuing autochanger "loaded? drive 0" command. 23-Nov 20:27 kraken-sd JobId 40124: 3302 Autochanger "loaded? drive 0", result: nothing loaded. 23-Nov 20:27 kraken-sd JobId 40124: W]# /usr/local/sbin/mtx-changer /dev/pass10 load 5 /dev/sa0 0 Loading media from Storage Element 5 into drive 0...done arning: mount.c:217 Open device "DTL01" (/dev/nsa0) Volume "DGG465" failed: ERR=dev.c:491 Unable to open device "DTL01" (/dev/nsa0): ERR=Device not configured 23-Nov 20:27 kraken-sd JobId 40124: Invalid slot=0 defined in catalog for Volume "DGG465" on "DTL01" (/dev/nsa0). Manual load may be required. 23-Nov 20:27 kraken-sd JobId 40124: Please mount Volume "DGG465" or label a new one for: Job: kraken_tape.2010-11-23_20.26.41_08 Storage: "DTL01" (/dev/nsa0) Pool: Fulls Media type: DLT *m 23-Nov 20:32 kraken-sd JobId 40124: 3301 Issuing autochanger "loaded? drive 0" command. 23-Nov 20:32 kraken-sd JobId 40124: 3302 Autochanger "loaded? drive 0", result: nothing loaded. 23-Nov 20:32 kraken-sd JobId 40124: 3301 Issuing autochanger "loaded? drive 0" command. 23-Nov 20:32 kraken-sd JobId 40124: 3302 Autochanger "loaded? drive 0", result: nothing loaded. 23-Nov 20:32 kraken-sd JobId 40124: Warning: mount.c:217 Open device "DTL01" (/dev/nsa0) Volume "DGG465" failed: ERR=dev.c:491 Unable to open device "DTL01" (/dev/nsa0): ERR=Device not configured 23-Nov 20:32 kraken-sd JobId 40124: Invalid slot=0 defined in catalog for Volume "DGG465" on "DTL01" (/dev/nsa0). Manual load may be required. 23-Nov 20:37 kraken-sd JobId 40124: 3301 Issuing autochanger "loaded? drive 0" command. 23-Nov 20:37 kraken-sd JobId 40124: 3302 Autochanger "loaded? drive 0", result: nothing loaded. 23-Nov 20:37 kraken-sd JobId 40124: 3301 Issuing autochanger "loaded? drive 0" command. 23-Nov 20:37 kraken-sd JobId 40124: 3302 Autochanger "loaded? drive 0", result: nothing loaded. 23-Nov 20:37 kraken-sd JobId 40124: Warning: mount.c:217 Open device "DTL01" (/dev/nsa0) Volume "DGG465" failed: ERR=dev.c:491 Unable to open device "DTL01" (/dev/nsa0): ERR=Device not configured 23-Nov 20:37 kraken-sd JobId 40124: Invalid slot=0 defined in catalog for Volume "DGG465" on "DTL01" (/dev/nsa0). Manual load may be required. 23-Nov 20:42 kraken-sd JobId 40124: 3301 Issuing autochanger "loaded? drive 0" command. 23-Nov 20:42 kraken-sd JobId 40124: 3302 Autochanger "loaded? drive 0", result: nothing loaded. 23-Nov 20:42 kraken-sd JobId 40124: 3301 Issuing autochanger "loaded? drive 0" command. 23-Nov 20:42 kraken-sd JobId 40124: 3302 Autochanger "loaded? drive 0", result: nothing loaded. 23-Nov 20:42 kraken-sd JobId 40124: Warning: mount.c:217 Open device "DTL01" (/dev/nsa0) Volume "DGG465" failed: ERR=dev.c:491 Unable to open device "DTL01" (/dev/nsa0): ERR=Device not configured 23-Nov 20:42 kraken-sd JobId 40124: Invalid slot=0 defined in catalog for Volume "DGG465" on "DTL01" (/dev/nsa0). Manual load may be required. 23-Nov 20:47 kraken-sd JobId 40124: 3301 Issuing autochanger "loaded? drive 0" command. 23-Nov 20:47 kraken-sd JobId 40124: 3302 Autochanger "loaded? drive 0", result: nothing loaded. 23-Nov 20:47 kraken-sd JobId 40124: 3301 Issuing autochanger "loaded? drive 0" command. 23-Nov 20:47 kraken-sd JobId 40124: 3302 Autochanger "loaded? drive 0", result: nothing loaded. 23-Nov 20:47 kraken-sd JobId 40124: Warning: mount.c:217 Open device "DTL01" (/dev/nsa0) Volume "DGG465" failed: ERR=dev.c:491 Unable to open device "DTL01" (/dev/nsa0): ERR=Device not configured *
Why do you want DGG465? There are perfectly fine Volumes already in the library:
*list media pool=Fulls +---------+------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+ | mediaid | volumename | volstatus | enabled | volbytes | volfiles | volretention | recycle | slot | inchanger | mediatype | lastwritten | +---------+------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+ | 267 | DGG457 | Full | 1 | 49,412,772,864 | 61 | 94,608,000 | 1 | 0 | 0 | DLT | 2010-02-23 12:31:20 | | 268 | DGG441 | Full | 1 | 52,202,078,208 | 62 | 94,608,000 | 1 | 0 | 0 | DLT | 2010-03-07 09:29:08 | | 269 | DGG471 | Error | 1 | 49,254,395,904 | 53 | 94,608,000 | 1 | 0 | 0 | DLT | 2010-03-07 15:37:37 | | 270 | DGG465 | Append | 1 | 64,512 | 0 | 94,608,000 | 1 | 0 | 0 | DLT | | | 271 | DGG440 | Full | 1 | 55,951,193,088 | 69 | 94,608,000 | 1 | 0 | 0 | DLT | 2010-02-07 10:28:25 | | 1,277 | ETU001 | Append | 1 | 64,512 | 0 | 94,608,000 | 1 | 0 | 0 | DLT | | | 1,278 | ETU010 | Append | 1 | 64,512 | 0 | 94,608,000 | 1 | 0 | 0 | DLT | | | 1,279 | ETU009 | Append | 1 | 64,512 | 0 | 94,608,000 | 1 | 0 | 0 | DLT | | | 1,280 | ETU008 | Append | 1 | 64,512 | 0 | 94,608,000 | 1 | 0 | 0 | DLT | | | 1,281 | ETU007 | Append | 1 | 64,512 | 0 | 94,608,000 | 1 | 0 | 0 | DLT | | | 1,282 | ETU006 | Append | 1 | 64,512 | 0 | 94,608,000 | 1 | 5 | 1 | DLT | | | 1,283 | ETU005 | Append | 1 | 64,512 | 0 | 94,608,000 | 1 | 0 | 0 | DLT | | | 1,284 | ETU004 | Append | 1 | 64,512 | 0 | 94,608,000 | 1 | 6 | 1 | DLT | | | 1,285 | ETU003 | Append | 1 | 64,512 | 0 | 94,608,000 | 1 | 7 | 1 | DLT | | | 1,286 | ETU002 | Append | 1 | 64,512 | 0 | 94,608,000 | 1 | 0 | 0 | DLT | | +---------+------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
So let me manually load a tape into the drive:
# /usr/local/sbin/mtx-changer /dev/pass10 load 5 /dev/sa0 0 Loading media from Storage Element 5 into drive 0...done
Then, mount it:
*mount storage=DigitalTapeLibrary 3001 OK mount requested. Device="DTL01" (/dev/nsa0) *m 23-Nov 20:55 kraken-sd JobId 40124: 3301 Issuing autochanger "loaded? drive 0" command. 23-Nov 20:55 kraken-sd JobId 40124: 3302 Autochanger "loaded? drive 0", result is Slot 5. *m You have no messages. *
Then it ran!
*m 23-Nov 20:55 kraken-sd JobId 40124: Wrote label to prelabeled Volume "ETU006" on device "DTL01" (/dev/nsa0) 23-Nov 20:55 kraken-sd JobId 40124: Job write elapsed time = 00:00:01, Transfer rate = 1.201 K Bytes/second 23-Nov 20:55 kraken-sd JobId 40124: Sending spooled attrs to the Director. Despooling 259 bytes ... 23-Nov 20:55 bacula-dir JobId 40124: Bacula bacula-dir 5.0.3 (04Aug10): 23-Nov-2010 20:55:35 Build OS: i386-portbld-freebsd8.1 freebsd 8.1-STABLE JobId: 40124 Job: kraken_tape.2010-11-23_20.26.41_08 Backup Level: Full Client: "kraken-fd" 5.0.3 (04Aug10) amd64-portbld-freebsd8.1,freebsd,8.1-STABLE FileSet: "small fileset" 2010-11-23 20:15:00 Pool: "Fulls" (From Job FullPool override) Catalog: "MyCatalog" (From Client resource) Storage: "DigitalTapeLibrary" (From Pool resource) Scheduled time: 23-Nov-2010 20:26:35 Start time: 23-Nov-2010 20:27:25 End time: 23-Nov-2010 20:55:35 Elapsed time: 28 mins 10 secs Priority: 10 FD Files Written: 1 SD Files Written: 1 FD Bytes Written: 1,112 (1.112 KB) SD Bytes Written: 1,201 (1.201 KB) Rate: 0.0 KB/s Software Compression: None VSS: no Encryption: no Accurate: no Volume name(s): ETU006 Volume Session Id: 162 Volume Session Time: 1290046365 Last Volume Bytes: 129,024 (129.0 KB) Non-fatal FD errors: 0 SD Errors: 0 FD termination status: OK SD termination status: OK Termination: Backup OK 23-Nov 20:55 bacula-dir JobId 40124: Begin pruning Jobs older than 3 years . 23-Nov 20:55 bacula-dir JobId 40124: No Jobs found to prune. 23-Nov 20:55 bacula-dir JobId 40124: Begin pruning Jobs. 23-Nov 20:55 bacula-dir JobId 40124: No Files found to prune. 23-Nov 20:55 bacula-dir JobId 40124: End auto prune. 23-Nov 20:55 bacula-dir JobId 40124: shell command: run AfterJob "/home/dan/bin/dlt-stats Full ETU006" 23-Nov 20:55 bacula-dir JobId 40124: AfterJob: sa1 23-Nov 20:55 bacula-dir JobId 40124: AfterJob: camcontrol: cam_lookup_pass: CAMGETPASSTHRU ioctl failed 23-Nov 20:55 bacula-dir JobId 40124: AfterJob: cam_lookup_pass: No such file or directory 23-Nov 20:55 bacula-dir JobId 40124: AfterJob: cam_lookup_pass: either the pass driver isn't in your kernel 23-Nov 20:55 bacula-dir JobId 40124: AfterJob: cam_lookup_pass: or sa1 doesn't exist 23-Nov 20:55 bacula-dir JobId 40124: AfterJob: (standard_in) 1: syntax error 23-Nov 20:55 bacula-dir JobId 40124: AfterJob: [: !=: unexpected operator 23-Nov 20:55 bacula-dir JobId 40124: AfterJob: camcontrol: cam_lookup_pass: CAMGETPASSTHRU ioctl failed 23-Nov 20:55 bacula-dir JobId 40124: AfterJob: cam_lookup_pass: No such file or directory 23-Nov 20:55 bacula-dir JobId 40124: AfterJob: cam_lookup_pass: either the pass driver isn't in your kernel 23-Nov 20:55 bacula-dir JobId 40124: AfterJob: cam_lookup_pass: or sa1 doesn't exist 23-Nov 20:55 bacula-dir JobId 40124: AfterJob: camcontrol: cam_lookup_pass: CAMGETPASSTHRU ioctl failed 23-Nov 20:55 bacula-dir JobId 40124: AfterJob: cam_lookup_pass: No such file or directory 23-Nov 20:55 bacula-dir JobId 40124: AfterJob: cam_lookup_pass: either the pass driver isn't in your kernel 23-Nov 20:55 bacula-dir JobId 40124: AfterJob: cam_lookup_pass: or sa1 doesn't exist *
After a few adjustments, mostly to the JobDefs, I now have a job that runs:
*run job=CopyMegaFileToTape Using Catalog "MyCatalog" Run Copy job JobName: CopyMegaFileToTape Bootstrap: *None* Client: wocker-fd FileSet: wocker files Pool: FullsFile (From Job resource) Read Storage: MegaFile (From Pool resource) Write Storage: DigitalTapeLibrary (From Storage from Pool's NextPool resource) JobId: *None* When: 2010-11-23 20:49:49 Catalog: MyCatalog Priority: 10 OK to run? (yes/mod/no): yes Job queued. JobId=40131 You have messages. *m 23-Nov 21:49 bacula-dir JobId 40131: The following 1 JobId was chosen to be copied: 39676 23-Nov 21:49 bacula-dir JobId 40131: Copying using JobId=39676 Job=wocker.2010-11-07_05.55.00_25 23-Nov 21:49 bacula-dir JobId 40131: Bootstrap records written to /home/bacula/working/bacula-dir.restore.3.bsr 23-Nov 21:49 bacula-dir JobId 40131: Start Copying JobId 40131, Job=CopyMegaFileToTape.2010-11-23_21.49.51_21 23-Nov 21:49 bacula-dir JobId 40131: Using Device "DTL01" 23-Nov 21:49 kraken-sd JobId 40131: Ready to read from volume "FileAuto-1220" on device "MegaFile" (/storage/compressed/bacula/volumes). 23-Nov 21:49 kraken-sd JobId 40131: 3301 Issuing autochanger "loaded? drive 0" command. 23-Nov 21:49 kraken-sd JobId 40131: 3302 Autochanger "loaded? drive 0", result: nothing loaded. 23-Nov 21:49 kraken-sd JobId 40131: 3304 Issuing autochanger "load slot 5, drive 0" command. *m 23-Nov 21:51 kraken-sd JobId 40131: 3305 Autochanger "load slot 5, drive 0", status is OK. 23-Nov 21:51 kraken-sd JobId 40131: Volume "ETU006" previously written, moving to end of data. 23-Nov 21:52 kraken-sd JobId 40131: Ready to append to end of Volume "ETU006" at file=2. 23-Nov 21:52 kraken-sd JobId 40131: Forward spacing Volume "FileAuto-1220" to file:block 0:2340466654. 23-Nov 22:00 kraken-sd JobId 40131: End of Volume at file 1 on device "MegaFile" (/storage/compressed/bacula/volumes), Volume "FileAuto-1220" 23-Nov 22:00 kraken-sd JobId 40131: Ready to read from volume "FileAuto-1224" on device "MegaFile" (/storage/compressed/bacula/volumes). 23-Nov 22:00 kraken-sd JobId 40131: Forward spacing Volume "FileAuto-1224" to file:block 0:215. 23-Nov 22:18 kraken-sd JobId 40131: End of Volume at file 1 on device "MegaFile" (/storage/compressed/bacula/volumes), Volume "FileAuto-1224" 23-Nov 22:18 kraken-sd JobId 40131: Ready to read from volume "FileAuto-1225" on device "MegaFile" (/storage/compressed/bacula/volumes). 23-Nov 22:18 kraken-sd JobId 40131: Forward spacing Volume "FileAuto-1225" to file:block 0:215. 23-Nov 22:38 kraken-sd JobId 40131: End of Volume at file 1 on device "MegaFile" (/storage/compressed/bacula/volumes), Volume "FileAuto-1225" 23-Nov 22:38 kraken-sd JobId 40131: Ready to read from volume "FileAuto-1226" on device "MegaFile" (/storage/compressed/bacula/volumes). 23-Nov 22:38 kraken-sd JobId 40131: Forward spacing Volume "FileAuto-1226" to file:block 0:215. 23-Nov 22:41 kraken-sd JobId 40131: End of Volume at file 0 on device "MegaFile" (/storage/compressed/bacula/volumes), Volume "FileAuto-1226" 23-Nov 22:41 kraken-sd JobId 40131: End of all volumes. 23-Nov 22:41 kraken-sd JobId 40131: Sending spooled attrs to the Director. Despooling 42,692,603 bytes ... 23-Nov 22:45 bacula-dir JobId 40131: Bacula bacula-dir 5.0.3 (04Aug10): 23-Nov-2010 22:45:07 Build OS: i386-portbld-freebsd8.1 freebsd 8.1-STABLE Prev Backup JobId: 39676 Prev Backup Job: wocker.2010-11-07_05.55.00_25 New Backup JobId: 40132 Current JobId: 40131 Current Job: CopyMegaFileToTape.2010-11-23_21.49.51_21 Backup Level: Full Client: wocker-fd FileSet: "wocker files" 2010-03-20 05:55:02 Read Pool: "FullsFile" (From Job resource) Read Storage: "MegaFile" (From Pool resource) Write Pool: "Fulls" (From Job Pool's NextPool resource) Write Storage: "DigitalTapeLibrary" (From Storage from Pool's NextPool resource) Catalog: "MyCatalog" (From Client resource) Start time: 23-Nov-2010 21:49:53 End time: 23-Nov-2010 22:45:07 Elapsed time: 55 mins 14 secs Priority: 10 SD Files Written: 103,895 SD Bytes Written: 15,016,639,895 (15.01 GB) Rate: 4531.3 KB/s Volume name(s): ETU006 Volume Session Id: 166 Volume Session Time: 1290046365 Last Volume Bytes: 15,031,554,048 (15.03 GB) SD Errors: 0 SD termination status: OK Termination: Copying OK 23-Nov 22:45 bacula-dir JobId 40131: Begin pruning Jobs older than 3 years . 23-Nov 22:45 bacula-dir JobId 40131: No Jobs found to prune. 23-Nov 22:45 bacula-dir JobId 40131: Begin pruning Jobs. 23-Nov 22:45 bacula-dir JobId 40131: No Files found to prune. 23-Nov 22:45 bacula-dir JobId 40131: End auto prune. 23-Nov 22:45 bacula-dir JobId 40131: shell command: run AfterJob "/home/dan/bin/dlt-stats Full FileAuto-1226" 23-Nov 22:45 bacula-dir JobId 40131: AfterJob: sa1 23-Nov 22:45 bacula-dir JobId 40131: AfterJob: camcontrol: cam_lookup_pass: CAMGETPASSTHRU ioctl failed 23-Nov 22:45 bacula-dir JobId 40131: AfterJob: cam_lookup_pass: No such file or directory 23-Nov 22:45 bacula-dir JobId 40131: AfterJob: cam_lookup_pass: either the pass driver isn't in your kernel 23-Nov 22:45 bacula-dir JobId 40131: AfterJob: cam_lookup_pass: or sa1 doesn't exist 23-Nov 22:45 bacula-dir JobId 40131: AfterJob: (standard_in) 1: syntax error 23-Nov 22:45 bacula-dir JobId 40131: AfterJob: [: !=: unexpected operator 23-Nov 22:45 bacula-dir JobId 40131: AfterJob: camcontrol: cam_lookup_pass: CAMGETPASSTHRU ioctl failed 23-Nov 22:45 bacula-dir JobId 40131: AfterJob: cam_lookup_pass: No such file or directory 23-Nov 22:45 bacula-dir JobId 40131: AfterJob: cam_lookup_pass: either the pass driver isn't in your kernel 23-Nov 22:45 bacula-dir JobId 40131: AfterJob: cam_lookup_pass: or sa1 doesn't exist 23-Nov 22:45 bacula-dir JobId 40131: AfterJob: camcontrol: cam_lookup_pass: CAMGETPASSTHRU ioctl failed 23-Nov 22:45 bacula-dir JobId 40131: AfterJob: cam_lookup_pass: No such file or directory 23-Nov 22:45 bacula-dir JobId 40131: AfterJob: cam_lookup_pass: either the pass driver isn't in your kernel 23-Nov 22:45 bacula-dir JobId 40131: AfterJob: cam_lookup_pass: or sa1 doesn't exist
The JobDefs is:
JobDefs { Name = "DefaultJobTape" Type = Backup Level = Incremental Client = polo-fd FileSet = "Full Set" Schedule = "WeeklyCycle" Storage = DigitalTapeLibrary Messages = Standard Pool = FullsFile # Full Backup Pool = Fulls # Incremental Backup Pool = Incrementals # Differential Backup Pool = Differentials Priority = 10 # don't spool date when backing up to disk Spool Data = no Spool Attributes = yes Allow Higher Duplicates = no Allow Duplicate Jobs = no Cancel Queued Duplicates = yes RunAfterJob = "/home/dan/bin/dlt-stats %l %v" }
The job itself:
Job { Name = "CopyMegaFileToTape" Type = Copy JobDefs = "DefaultJobTape" Messages = Standard Schedule = "Never" # required, but presumably ignored Client = wocker-fd # required, but presumably ignored FileSet = "wocker files" Selection Type = SQLQuery # Selection Pattern = "select jobid, name, poolid from job where starttime >= '14-Mar-2007 10:14:44' and starttime < = '17-Mar-2007 03:15:12' order by jobid" # Selection Pattern = "select jobid from jobmedia where mediaid = 134;" Selection Pattern = "select jobid, name, poolid, starttime, jobbytes from job where starttime between '2010-03-13 13:59:43' and '2011-03-14 12:22:52' and level = 'F' and jobid = 39676 order by jobid" # no sense spooling local data Spool Data = no Spool Attributes = yes Maximum Concurrent Jobs = 4 }
Now that I have the basics running, I can see why I might want to put everything into one pool. Each pool needs its own Copy Job.... However, I like the concept of keeping Volumes, on a File based system, in some type of a directory hierarchy. ZFS (my filesystem of choice for this endeavor) will have no problem coping with a large number of files in a single directory.
If I do decide to merge everything into one pool, I will have to:
- Move all the Volume files to a single directory
- Alter the Archive Device directive within each Device resource to point to the above mentioned directory
That should be it. Sound easy enough to you?