XenでBacula用のDomain-U作って運用してる。
気づいたらそのハードディスクイメージの使用率が100%になっててBaculaが止まってた。
Xenだから別にいいやと思って、ハードディスクをシステム用とデータ用で分けてなかった。
ちょっと前にISOを展開してHTTP経由で見れるようにしたのが原因。
今回はそのディレクトリをバックアップから除外して、ラベルを作り直して復旧させた。
本体は全然止まらないのに、バックアップがよく死ぬ。
Xenはよく止まる。
困ったもんだ。
Webから見れるようにしようと思ってから半年が経った。
復旧手順
ハードディスク使用率100%
[root@bacula ~]# df / Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/VolGroup00-LogVol00 259361836 254559788 0 100% /
バックアップデータ全削除
rm /var/backup/eth0
ラベル削除
*delete Automatically selected Catalog: MyCatalog Using Catalog "MyCatalog" In general it is not a good idea to delete either a Pool or a Volume since they may contain data. You have the following choices: 1: volume 2: pool 3: jobid Choose catalog item to delete (1-3): 1 Automatically selected Pool: Default +---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+ | MediaId | VolumeName | VolStatus | Enabled | VolBytes | VolFiles | VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten | +---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+ | 1 | eth0 | Error | 1 | 257,482,597,491 | 59 | 5,184,000 | 1 | 0 | 1 | File | 2010-01-28 02:07:58 | +---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+ Enter MediaId or Volume name: eth0 This command will delete volume eth0 and all Jobs saved on that volume from the Catalog Are you sure you want to delete this Volume? (yes/no): y
bacula-dir.confに除外リストを追加
FileSet { Exclude { # 除外するディレクトリのフルパスを追加 } }
リロード
service bacula-dir restart
ラベル作成
*label Automatically selected Storage: File Enter new Volume name: eth0jp Automatically selected Pool: Default Connecting to Storage daemon File at 192.168.0.200:9103 ... Sending label command for Volume "eth0jp" Slot 0 ... 3000 OK label. VolBytes=190 DVD=0 Volume="eth0jp" Device="FileStorage" (/var/backup) Catalog record for Volume "eth0jp", Slot 0 successfully created. Requesting to mount FileStorage ... 3906 File device "FileStorage" (/var/backup) is always mounted.
バックアップ実行
*run A job name must be specified. The defined Job resources are: 1: Client1 2: BackupCatalog 3: RestoreFiles Select Job resource (1-3): 1 Run Backup job JobName: Client1 Level: Incremental Client: bacula-fd FileSet: Full Set Pool: Default (From Job resource) Storage: File (From Job resource) When: 2010-01-28 02:58:34 Priority: 10 OK to run? (yes/mod/no): yes Job queued. JobId=154 You have messages.
バックアップ開始
28-Jan 02:58 bacula-dir: No prior Full backup Job record found. 28-Jan 02:58 bacula-dir: No prior or suitable Full backup found in catalog. Doing FULL backup. 28-Jan 02:58 bacula-dir: Start Backup JobId 154, Job=Client1.2010-01-28_02.58.55 28-Jan 02:58 bacula-sd: Wrote label to prelabeled Volume "eth0jp" on device "FileStorage" (/var/backup)
バックアップ終了
28-Jan 03:34 bacula-sd: Job write elapsed time = 00:36:00, Transfer rate = 9.153 M bytes/second 28-Jan 03:34 bacula-dir: Bacula 2.0.3 (06Mar07): 28-Jan-2010 03:34:58 JobId: 154 Job: Client1.2010-01-28_02.58.55 Backup Level: Full (upgraded from Incremental) Client: "bacula-fd" 2.0.3 (06Mar07) i686-redhat-linux-gnu,redhat,Enterprise release FileSet: "Full Set" 2010-01-28 02:07:54 Pool: "Default" (From Job resource) Storage: "File" (From Job resource) Scheduled time: 28-Jan-2010 02:58:34 Start time: 28-Jan-2010 02:58:58 End time: 28-Jan-2010 03:34:58 Elapsed time: 36 mins Priority: 10 FD Files Written: 160,261 SD Files Written: 160,261 FD Bytes Written: 19,743,489,858 (19.74 GB) SD Bytes Written: 19,771,993,033 (19.77 GB) Rate: 9140.5 KB/s Software Compression: 17.6 % VSS: no Encryption: no Volume name(s): eth0jp Volume Session Id: 1 Volume Session Time: 1264571350 Last Volume Bytes: 19,792,345,959 (19.79 GB) Non-fatal FD errors: 0 SD Errors: 0 FD termination status: OK SD termination status: OK Termination: Backup OK 28-Jan 03:34 bacula-dir: Begin pruning Jobs. 28-Jan 03:34 bacula-dir: No Jobs found to prune. 28-Jan 03:34 bacula-dir: Begin pruning Files. 28-Jan 03:34 bacula-dir: No Files found to prune. 28-Jan 03:34 bacula-dir: End auto prune.
空き容量
[root@bacula bacula]# df / Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/VolGroup00-LogVol00 259361836 21309608 224664864 9% /