Bacula is an open source backup automation software in use by Miraheze to run automated 'offsite' (off host / country / networking / power grid) backups of critical data in the infrastructure.
Backup Schedules[edit | edit source]
Miraheze runs two backup schedules in production:
- WeeklyCycle - A full backup every Sunday of the month.
- BiWeeklyCycle - A full backup on the 1st Sunday of every month with a differential backup on the 3rd Sunday of every month.
Backup jobs we run operate on different cycles as listed below:
- WeeklyCycle - Private Git (puppet2).
- BiWeeklyCycle - Databases (db6, dbt1), Static (gluster*), Phabricator Static (phab1).
Adding New Backups[edit | edit source]
The process gets more complicated the more "new" you mean by Backups:
- You may need to define a new file set if there has never been a backup of the service before, see the databases file store.
- You may need to define a new client if the server if new - see db4-fd for an example and remember to include bacula::client on the server!
- You will need to define a new pool and new backup and restore jobs.
Restoring a Backup[edit | edit source]
Backups should *only* be restored when absolutely necessary because of network transfer and space limitations on receiving servers. If you need to do this, open up the bconsole on the bacula server by running `bconsole`.
- Check there is enough space on the receiving server, you can do this by running `list volume`, finding the volume and checking the "VolBytes" value for the volume.
- If there is enough space, run `restore` on the console and select 5 (Select by client), and select the client you wish to run the backup to.
- Run "mark *" or "mark [directory/file]" you wish to restore and then run "done" when done.
- You will be given a list of restore jobs, select the job relevant for the service you are restoring.
- You will then be given the option of saying, yes, no, mod to the job. Say yes and the job will be queued and ran on the client server.
- The backup will be in the /bacula/restore directory on the server.
Operation[edit | edit source]
The below covers operations that you may need to run in the bconsole and exist wholly for general reference. Any common (or complicated) procedures will be documented above in more detail.
cancel[edit | edit source]
The command allows canceling a planned or running job. It's an interactive command that can be ran by typing 'cancel' and selecting the job to cancel numerically.
delete[edit | edit source]
The command allows deleting a job, pool or volume and is an interactive command that can be started by typing 'delete' and following the prompts. Deleting pools is strongly discouraged as they contain all volumes associated with a backup. They should only be deleted once their use has gone and the relevant references in Bacula are removed. Delete volumes is discouraged but can and should be done for technical reasons (e.g. retention fall through causing jobs to stick).
estimate[edit | edit source]
The command allows estimating the files and storage that will be used by a particular job when it is ran. It is an interactive command which can ran by typing 'estimate' and following the prompts for the relevant job(s).
exit / quit[edit | edit source]
The command terminates the console window.
list[edit | edit source]
The command lists object data from the Bacula database. The command is not interactive and must be ran as below:
- list volumes - lists all volumes and information associated with the volumes grouped by pools.
- list pools - lists all pools with information on volume contents and maximum size.
- list jobs - lists all information about every job ran.
- list jobtotals - lists statistical information about every job ran grouped by 'all' and 'pools'.
messages[edit | edit source]
The command displays the messages internally produced by Bacula to inform the administrator on changes in the install.
memory[edit | edit source]
The command lists current memory usage information of the process.
prune[edit | edit source]
The command allows pruning of all expired objects in the database. This is not necessary to run as it is automated.
restore[edit | edit source]
The command allows the restoring of a backup to the relevant server in the /bacula/restore directory. The command is interactive and can be accessed by typing 'restore'.
run[edit | edit source]
The command allows running of jobs. It is an interactive command and can be accessed by typing 'run'.
status[edit | edit source]
The command shows status information such as running jobs and volume status. It is an interactive command and can be ran by typing 'status'.
time[edit | edit source]
Does what it says on the tin.
version[edit | edit source]
Does what it says on the tin.