Tech:Bacula

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
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 (puppet1), Ganglia (misc2), Acme (mw1).
 * BiWeeklyCycle - Databases (db2, db3, db4), Static (cp1), Phabricator Static (misc1).

Adding New Backups
[TODO]

Restoring a Backup
[TODO]

Installing a New Backup Server
[TODO]

Re-installing a Backup server
If backups stop working, you upgrade the server, or change sizes, Bacula most likely needs a reinstall. To do this, connect to the Backupsy interface, and click "reinstall". This will reinstall the server (and delete the current backups!). After this, you should follow steps in Tech:Puppet to complete the reinstall.

Operation
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
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
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
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
The command terminates the console window.

list
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
The command displays the messages internally produced by Bacula to inform the administrator on changes in the install.

memory
The command lists current memory usage information of the process.

prune
The command allows pruning of all expired objects in the database. This is not necessary to run as it is automated.

restore
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
The command allows running of jobs. It is an interactive command and can be accessed by typing 'run'.

status
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
Does what it says on the tin.

version
Does what it says on the tin.