Recycle Status
Each Volume inherits the Recycle status (yes or no) from the Pool resource record when the Media record is created (normally when the Volume is labeled). This Recycle status is stored in the Media record of the Catalog. Using the Console program, you may subsequently change the Recycle status for each Volume. For example in the following output from list volumes:
VolumeNa |
Media |
VolSta |
VolByte |
LastWritte |
VolRet |
Rec |
---|---|---|---|---|---|---|
File0001 |
File |
Full |
4190055 |
2002-05-25 |
14400 |
1 |
File0002 |
File |
Full |
1896460 |
2002-05-26 |
14400 |
1 |
File0003 |
File |
Full |
1896460 |
2002-05-26 |
14400 |
1 |
File0004 |
File |
Full |
1896460 |
2002-05-26 |
14400 |
1 |
File0005 |
File |
Full |
1896460 |
2002-05-26 |
14400 |
1 |
File0006 |
File |
Full |
1896460 |
2002-05-26 |
14400 |
1 |
File0007 |
File |
Purged |
1896466 |
2002-05-26 |
14400 |
1 |
all the volumes are marked as recyclable, and the last Volume, File0007 has been purged, so it may be immediately recycled. The other volumes are all marked recyclable and when their Volume Retention period (14400 seconds or four hours) expires, they will be eligible for pruning, and possibly recycling. Even though Volume File0007 has been purged, all the data on the Volume is still recoverable. A purged Volume simply means that there are no entries in the Catalog. Even if the Volume Status is changed to , the data on the Volume will be recoverable. The data is lost only when the Volume is re-labeled and re-written.
To modify Volume File0001 so that it cannot be recycled, you use the update volume pool=File command in the console program, or simply update and Bacula will prompt you for the information.
VolumeNa |
Media |
VolSta |
VolByte |
LastWritte |
VolRet |
Rec |
---|---|---|---|---|---|---|
File0001 |
File |
Full |
4190055 |
2002-05-25 |
14400 |
0 |
File0002 |
File |
Full |
1897236 |
2002-05-26 |
14400 |
1 |
File0003 |
File |
Full |
1896460 |
2002-05-26 |
14400 |
1 |
File0004 |
File |
Full |
1896460 |
2002-05-26 |
14400 |
1 |
File0005 |
File |
Full |
1896460 |
2002-05-26 |
14400 |
1 |
File0006 |
File |
Full |
1896460 |
2002-05-26 |
14400 |
1 |
File0007 |
File |
Purged |
1896466 |
2002-05-26 |
14400 |
1 |
In this case, File0001 will never be automatically recycled. The same effect can be achieved by setting the Volume Status to Read-Only.
As you have noted, the Volume Status (VolStatus) column in the catalog database contains the current status of the Volume, which is normally maintained automatically by Bacula. To give you an idea of some of the values it can take during the life cycle of a Volume, here is a picture of the process.
A typical volume life cycle is like this:
because job count or size limit exceeded
Append ------------------------------------> Used/Full
| First Job writes to Retention time passed |
| the volume and recycling takes |
| place |
| v
Recycled <-------------------------------------- Purged
Volume is selected for reuse
See also
Go to Recycling Algorithm.
Go back to the Volume Recycling chapter.
Go back to the Storage Space Management chapter.
Go back to the main Bacula Enterprise chapter.