Login  View  Edit  Attributes  History  Attach  Print  Search

BackupTroubleshoot

Note: all commands written after a * are ones you enter to bconsole, all other lines are output, likewise for the command line, commands after billie:~# are ones you enter, other lines are output.

Backup problem:

You don't mount the weekly or monthly drive in time, and when you do, bacula claims:

Error: Bacula cannot write on disk Volume "weekly1" because: The sizes do not match! Volume=433819337410 Catalog=1

Solution:

Change the error status to used, and remount:

*list volumes pool=Weekly
+---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| MediaId | VolumeName | VolStatus | Enabled | VolBytes        | VolFiles | VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten         |
+---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
|       1 | weekly1    | Error     |       1 |               1 |        0 |    1,468,800 |       1 |    0 |         0 | File      | 2010-03-14 15:23:39 |
|      16 | weekly2    | Used      |       1 | 434,868,448,651 |      101 |    1,468,800 |       1 |    0 |         0 | File      | 2010-03-21 01:19:10 |
|      17 | CLNA0001   | Cleaning  |       1 |               0 |        0 |    2,160,000 |       1 |   10 |         1 |           | 0000-00-00 00:00:00 |
|      19 | weekly3    | Used      |       1 | 435,647,798,921 |      101 |      864,000 |       1 |    0 |         0 | File      | 2010-03-27 23:20:31 |
+---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
*update
Update choice:
     1: Volume parameters
     2: Pool from resource
     3: Slots from autochanger
Choose catalog item to update (1-3): 1
Parameters to modify:
     1: Volume Status
     2: Volume Retention Period
     3: Volume Use Duration
     4: Maximum Volume Jobs
     5: Maximum Volume Files
     6: Maximum Volume Bytes
     7: Recycle Flag
     8: Slot
     9: InChanger Flag
    10: Volume Files
    11: Pool
    12: Volume from Pool
    13: All Volumes from Pool
    14: Enabled
    15: RecyclePool
    16: Done
Select parameter to modify (1-16): 1
Defined Pools:
     1: Daily
     2: Weekly
     3: Monthly
     4: Servers
     5: Scratch
Select the Pool (1-5): 2
+---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| MediaId | VolumeName | VolStatus | Enabled | VolBytes        | VolFiles | VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten         |
+---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
|       1 | weekly1    | Error     |       1 |               1 |        0 |    1,468,800 |       1 |    0 |         0 | File      | 2010-03-14 15:23:39 |
|      16 | weekly2    | Used      |       1 | 434,868,448,651 |      101 |    1,468,800 |       1 |    0 |         0 | File      | 2010-03-21 01:19:10 |
|      17 | CLNA0001   | Cleaning  |       1 |               0 |        0 |    2,160,000 |       1 |   10 |         1 |           | 0000-00-00 00:00:00 |
|      19 | weekly3    | Used      |       1 | 435,647,798,921 |      101 |      864,000 |       1 |    0 |         0 | File      | 2010-03-27 23:20:31 |
+---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
Enter MediaId or Volume name: 1
Updating Volume "weekly1"
Current Volume status is: Error
Possible Values are:
     1: Append
     2: Archive
     3: Disabled
     4: Full
     5: Used
     6: Cleaning
     7: Read-Only
Choose new Volume Status (1-7): 5
New Volume status is: Used
Parameters to modify:
     1: Volume Status
     2: Volume Retention Period
     3: Volume Use Duration
     4: Maximum Volume Jobs
     5: Maximum Volume Files
     6: Maximum Volume Bytes
     7: Recycle Flag
     8: Slot
     9: InChanger Flag
    10: Volume Files
    11: Pool
    12: Volume from Pool
    13: All Volumes from Pool
    14: Enabled
    15: RecyclePool
    16: Done
Select parameter to modify (1-16): 16
Selection terminated.
*mount
The defined Storage resources are:
     1: Exabyte
     2: File
Select Storage resource (1-2): 1
3001 Device "Drive-1" (/dev/st0) is mounted with Volume "A0000004" 

Now bacula should mount the drive just fine, and start backing up without any problems.

Backup problem:

backup claims it needs a tape mounted, but when you look, it is already mounted.

Here is an example. You receive an email that looks something like this:

26-Jun 11:15 billie-sd JobId 181: Please mount Volume "A0000003" or label a new one for:
    Job:          BackupCatalog.2009-06-26_01.15.00.53
    Storage:      "Drive-1" (/dev/st0)
    Pool:         Daily
    Media type:   VXA-2

Solution:

So you log into billie and check to see what is mounted:

billie:~# mtx -f /dev/sg2 status
  Storage Changer /dev/sg2:1 Drives, 10 Slots ( 0 Import/Export )
Data Transfer Element 0:Full (Storage Element 3 Loaded):VolumeTag = A0000003                            
      Storage Element 1:Full :VolumeTag=A0000001                            
      Storage Element 2:Full :VolumeTag=B0000001                            
      Storage Element 3:Empty:VolumeTag=                                    
      Storage Element 4:Full :VolumeTag=A0000004                            
      Storage Element 5:Full :VolumeTag=B0000002                            
      Storage Element 6:Full :VolumeTag=A0000002                            
      Storage Element 7:Full :VolumeTag=A0000007                            
      Storage Element 8:Full :VolumeTag=A0000008                            
      Storage Element 9:Full :VolumeTag=A0000010                            
      Storage Element 10:Full :VolumeTag=CLNA0001           

A0000003 is mounted, but bacula just told you it wasn't. Seems to be a communication error. First try telling bacula that the tape is already there. Release the tape and remount it in bacula, this generally solves the problem:

bconsole
*release
*mount

this will cause the changer to unload the tape that is in the drive. This will take a couple of minutes. Once it is done, try the mount command.
*mount

  • mount

The defined Storage resources are:

     1: Exabyte
     2: File

Select Storage resource (1-2): 1 3001 OK mount. Device="Drive-1" (/dev/st0)

You have messages.

  • messages

26-Jun 11:28 billie-sd JobId 181: Error: block.c:999 Read error on fd=7 at file:blk 0:0 on device "Drive-1" (/dev/st0). ERR=Input/output error. 26-Jun 11:28 billie-sd JobId 181: Please mount Volume "A0000003" or label a new one for:

    Job:          BackupCatalog.2009-06-26_01.15.00.53
    Storage:      "Drive-1" (/dev/st0)
    Pool:         Daily
    Media type:   VXA-2

@]

Uh, oh, looks like that didn't work this time. Try mounting the tape outside of bacula, which sometimes works to re-establish communication properly.
While still in bconsole type:

*release

this will cause the changer to unload the tape that is in the drive.
log out of bconsole
load the tape back in from outside of the bconsole program. You might need to first check to see which slot the requested tape is in, as the number after load is the slot:

billie:~# mtx -f /dev/sg2 status
billie:~# mtx -f /dev/sg2 load 3 

log back into bconsole

*mount

On occasion, the remount also does not work. Sometimes just retyping the mount command again in bconsole is enough, sometimes you need to retry the whole sequence. If you just can't get it to work, use bconsole to move a tape from the Scratch pool to whichever pool needs a new tape, and then type mount again. This sequence looks like this:

*update
Update choice:
     1: Volume parameters
     2: Pool from resource
     3: Slots from autochanger
Choose catalog item to update (1-3): 1
Parameters to modify:
     1: Volume Status
     2: Volume Retention Period
     3: Volume Use Duration
     4: Maximum Volume Jobs
     5: Maximum Volume Files
     6: Maximum Volume Bytes
     7: Recycle Flag
     8: Slot
     9: InChanger Flag
    10: Volume Files
    11: Pool
    12: Volume from Pool
    13: All Volumes from Pool
    14: Enabled
    15: RecyclePool
    16: Done
Select parameter to modify (1-16): 11
Defined Pools:
     1: Daily
     2: Weekly
     3: Monthly
     4: Servers
     5: Scratch
Select the Pool (1-5): 5
+---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| MediaId | VolumeName | VolStatus | Enabled | VolBytes        | VolFiles | VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten         |
+---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
|       8 | A0000007   | Full      |       1 | 123,725,887,488 |      196 |      864,000 |       1 |    7 |         1 | VXA-2     | 2009-06-26 11:10:47 |
|      13 | B0000004   | Full      |       1 |  70,947,652,608 |       72 |      864,000 |       1 |    0 |         0 | VXA-2     | 2009-05-02 03:23:30 |
|      14 | B0000005   | Full      |       1 |  70,507,100,160 |       71 |      864,000 |       1 |    0 |         0 | VXA-2     | 2009-05-02 14:04:55 |
|      15 | B0000006   | Full      |       1 |  70,482,263,040 |       72 |      864,000 |       1 |    0 |         0 | VXA-2     | 2009-05-05 14:21:45 |
+---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
Enter MediaId or Volume name: 8
Updating Volume "A0000007"
Current Pool is: Scratch
Enter new Pool name: Daily
New Pool is: Daily
*mount

Note that when given the choice of tapes, we chose MediaId 8, which is marked as being in the changer.

If the tape still doesn't show up, it is probably time to throw away that tape. Use the delete command to get rid of the tape from bacula's inventory, use the commands on the tape changer to eject the tape, and throw it away. You may need to get out another tape. They live on top of the right hand file cabinet, underneath the counter by the windows in the lab. Pull out a tape, insert it in the tape drive, and use the command *label barcodes slots=6 (where slots is whichever slot you inserted the tape to).

after billie lost the home directories the last time, bacula was having problems seeing the tape changer, turned out permissions for the changer got messed up and weren't group r/w, need to be:
crw-rw---- 1 root disk 21, 1 2007-02-16 11:47 /dev/sg1
I think can be group tape instead of disk, but group permissions are the key.

Hints for using bconsole can be found here http://www.bacula.org/en/dev-manual/Bacula_Console.html

more troubleshooting: http://www.debianhelp.co.uk/bacula1.htm