フルバックが終わってないのにスケジュールに従って差分バックアップが待ち行列に並ぶなら
bconsoleで「cancel」を行う
まず、カタログデータからそのテープの情報を削除する
bconsole --> delete --> volume --> (poolを選択. [Full]とか) --> 初期化したいテープその後、テープ装置をbaculaの支配下から開放する
bconsole --> unmountその後、mtxやmtコマンドを使ってテープを手動で初期化する
mtx -f /dev/sg1 load 1 0 # 1st slotsのテープをdriveにロード(2nd slotなら mtx -f /dev/sg1 load 2 0)
mt -f /dev/st0 rewind
mt -f /dev/st0 weof
mt -f /dev/st0 rewind
mtx -f /dev/sg1 unload 1 0その後、再びテープ装置をbaculaの支配下に入れて、ラベルを貼る
(ここではオートローダーでの場合で、テープに添付のバーコードを使ってます)
bconsole --> mount
bconsole --> label barcodes slots=1 pool=Fullbacula-sdを再起動すれば戻るかも
Bacula-dirの「Pool」項目
「Volume Use Duration」は追記可能期間
「Volume Retention」は上書き禁止期間
と思っている。
データベースに収められた情報の寿命を示す。Bacula-dirの「Client」項目
既定では、File Retentionは60日。Job Retentionは180日
一度だけのアーカイブ目的なら、10 years と記載かと。
/homeとかのdailyで(差分|増分)バックアップする場所なら 60/180 days はありかな。
updateとかlabel、deleteを選んで最後まで選びたくなく、途中で抜けたいときがある
その場合は「.」を入力する。
これで選択タスクは中止にできる
メディアを再利用したい場合に言われたなら、一旦 bacula-sd を止めて、テープをmtで無理やり弄る
[root@xxx ~]# systemctl stop bacula-sd
[root@xxx ~]# mtx -f /dev/sg1 load 1 0 <---対象のメディアをロード
[root@xxx ~]# mt -f /dev/st0 rewind
[root@xxx ~]# mt -f /dev/st0 weof
[root@xxx ~]# mt -f /dev/st0 rewind
[root@xxx ~]# mtx -f /dev/sg1 unload 1 0これでOK.強制的なメディアの初期化と言うべきかな
オートローダーで7番目のメディアがロードされている時に mtx で unload しようとしたら下記のように怒られる
事前に bconsole で umount 処置を取れば mtx で操作可能です。
[root@xxx ~]# mtx -f /dev/sg1 unload
Unloading drive 0 into Storage Element 7...mtx: Request Sense: Long Report=yes
mtx: Request Sense: Valid Residual=no
mtx: Request Sense: Error Code=70 (Current)
mtx: Request Sense: Sense Key=Illegal Request
mtx: Request Sense: FileMark=no
mtx: Request Sense: EOM=no
mtx: Request Sense: ILI=no
mtx: Request Sense: Additional Sense Code = 53
mtx: Request Sense: Additional Sense Qualifier = 03
mtx: Request Sense: BPV=no
mtx: Request Sense: Error in CDB=no
mtx: Request Sense: SKSV=no
MOVE MEDIUM from Element Address 1 to 1007 Failed
[root@xxx ~]#「3604 JobId=35 Tape device "LTO-7-Drive" (/dev/tape/by-id/scsi-xxxx) is BLOCKED due to user unmount.」
といわれジョブが進みません。
mount操作を行う必要があります。
なので、ジョブが終わったら メディアは元の位置に戻って欲しいのだが、、どうすれば?
IBMのlin_tapeで得られる/dev/IBMtape0は使わないほうがいい
Linuxが既定で提供する /dev/st0 らを使う。
(eofが見つけられないのかエラーになる)
/etc/sysconfig/bacula-dir
/etc/sysconfig/bacula-sd
らに「LANG=C」
を加える