List and Query
EnterpriseBacula Enterprise Only
This solution is only available for Bacula Enterprise. For subscription inquiries, please reach out to sales@baculasystems.com.
The HDFS Plugin can list snapshottable directories and query snapshot contents.
Command Overview
q_json_pretty=yesformats query output as pretty-printed JSON.
The backend understands two query targets:
directoryto inspect snapshottable directoriessnapshot:<path>to inspect the snapshots under a directory
Directory Listing Output
A directory listing returns entries with the following keys:
directorysnapshotNumberquotaparent
Example output:
.query client=bacula-hdfs-fd plugin="hdfs: config_file=/opt/bacula/etc/hdfs.conf" parameter=directory
directory=myDir1
snapshotNumber=2
quota=64
parent=/
directory=myDir2
snapshotNumber=2
quota=64
parent=/
Snapshot Listing Output
A snapshot listing returns entries with the following keys:
snapshotnamepathblocksizemtimelenownergroup
Example output:
.query client=bacula-hdfs-fd plugin="hdfs: config_file=/opt/bacula/etc/hdfs.conf" parameter=snapshot:hdfs-regress-test
snapshot=/hdfs-regress-test/.snapshot/bsnap_TestJob.2020-01-31_11.33.55_03
name=bsnap_TestJob.2020-01-31_11.33.55_03
path=/hdfs-regress-test/.snapshot/bsnap_TestJob.2020-01-31_11.33.55_03
blocksize=134217728
mtime=1717760000000
len=0
owner=hadoop
group=supergroup
Typical Uses
Identify which directories are snapshottable before enabling a backup job.
Inspect the snapshot inventory for a given directory.
Go back to: Operations.