Backup
Assuming that we have the following Job configured in bacula-dir.conf
:
JobDefs {
Name = BackupJob
Type = Backup
Pool = Default
Storage = File
Messages = Standard
Priority = 10
Client=127.0.0.1-fd
Write Bootstrap = "/home/hdev/bacula-cloud/regress/working/%n-%f.bsr"
}
Job {
Name = PluginHdfsTest
JobDefs = BackupJob
FileSet= FS_Hdfs
}
FileSet {
Name = FS_Hdfs
Include {
Plugin = "hdfs: user=hadoop URL=hdfs://localhost:9000 include=btest1/*"
}
}
We can run this Job using the bconsole
program:
run job=PluginHdfsTest
Using Catalog "MyCatalog"
Run Backup job
JobName: PluginHdfsTest
Level: Full
Client: 127.0.0.1-fd
FileSet: TestPluginHdfsSet
Pool: Default (From Job resource)
Storage: File (From Job resource)
When: 2020-04-06 12:19:10
Priority: 10
OK to run? (yes/mod/no): yes
Job queued. JobId=1
wait
You have messages.
messages
06-abr 12:29 127.0.0.1-dir JobId 1: Start Backup JobId 1, Job=PluginHdfsTest.2020-04-06_12.29.12_05
06-abr 12:29 127.0.0.1-dir JobId 1: Using Device "FileStorage" to write.
06-abr 12:29 127.0.0.1-sd JobId 1: Wrote label to prelabeled Volume "TestVolume001" on File device "FileStorage" (/home/hdev/bacula-cloud/regress/tmp)
06-abr 12:29 127.0.0.1-fd JobId 1: hdfs: Starting HDFS Plugin Job
06-abr 12:29 127.0.0.1-fd JobId 1: hdfs: Finished reading HDFS Plugin Params
06-abr 12:29 127.0.0.1-fd JobId 1: hdfs: Starting backup
06-abr 12:29 127.0.0.1-fd JobId 1: hdfs: Finishing HDFS Plugin Job
06-abr 12:29 127.0.0.1-sd JobId 1: Elapsed time=00:00:01, Transfer rate=3.157 K Bytes/second
06-abr 12:29 127.0.0.1-sd JobId 1: Sending spooled attrs to the Director. Despooling 3,581 bytes ...
06-abr 12:29 127.0.0.1-dir JobId 1: Bacula 127.0.0.1-dir 12.4.0 (20Dec19):
Build OS: x86_64-pc-linux-gnu ubuntu 18.04
JobId: 1
Job: PluginHdfsTest.2020-04-06_12.29.12_05
Backup Level: Full
Client: "127.0.0.1-fd" 12.4.0 (20Dec19) x86_64-pc-linux-gnu,ubuntu,18.04
FileSet: "TestPluginHdfsSet" 2020-04-06 12:29:10
Pool: "Default" (From Job resource)
Catalog: "MyCatalog" (From Client resource)
Storage: "File" (From Job resource)
Scheduled time: 06-abr-2020 12:29:12
Start time: 06-abr-2020 12:29:14
End time: 06-abr-2020 12:29:17
Elapsed time: 3 secs
Priority: 10
FD Files Written: 13
SD Files Written: 13
FD Bytes Written: 60 (60 B)
SD Bytes Written: 3,157 (3.157 KB)
Rate: 0.0 KB/s
Software Compression: None
Comm Line Compression: 9.8% 1.1:1
Snapshot/VSS: no
Encryption: no
Accurate: no
Volume name(s): TestVolume001
Volume Session Id: 1
Volume Session Time: 1586186949
Last Volume Bytes: 4,586 (4.586 KB)
Non-fatal FD errors: 0
SD Errors: 0
FD termination status: OK
SD termination status: OK
Termination: Backup OK
06-abr 12:29 127.0.0.1-dir JobId 1: Begin pruning Jobs older than 6 months .
06-abr 12:29 127.0.0.1-dir JobId 1: No Jobs found to prune.
06-abr 12:29 127.0.0.1-dir JobId 1: Begin pruning Files.
06-abr 12:29 127.0.0.1-dir JobId 1: No Files found to prune.
06-abr 12:29 127.0.0.1-dir JobId 1: End auto prune.
list files jobid=1
Using Catalog "MyCatalog"
+------------------------------------+
| filename |
+------------------------------------+
| /@hdfs/btest1/files/A/A0A/bFa5csqF |
| /@hdfs/btest1/files/A/A0A/bEa4csqE |
| /@hdfs/btest1/files/A/A0A/bDa3csqD |
| /@hdfs/btest1/files/A/A0A/bCa2csqC |
| /@hdfs/btest1/files/A/A0A/bBa1csqB |
| /@hdfs/btest1/files/C/aCa2aaaC |
| /@hdfs/btest1/files/F/aFa5aaaF |
| /@hdfs/btest1/files/B/aBa1aaaB |
| /@hdfs/btest1/files/bAa0csqA |
| /@hdfs/btest1/files/E/aEa4aaaE |
| /@hdfs/btest1/files/A/aAa0aaaA |
| /@hdfs/btest1/files/D/aDa3aaaD |
+------------------------------------+
+-------+----------------+---------------------+------+-------+----------+----------+-----------+
| jobid | name | starttime | type | level | jobfiles | jobbytes | jobstatus |
+-------+----------------+---------------------+------+-------+----------+----------+-----------+
| 1 | PluginHdfsTest | 2020-04-06 12:29:14 | B | F | 13 | 60 | T |
+-------+----------------+---------------------+------+-------+----------+----------+-----------+
quit
See also
Go to Restore
Go to Useful Commands
Go back to the main HDFS Plugin page.
Go back to the main Dedicated Backup Solution page.