Project

General

Profile

Actions

Borg backups » History » Revision 3

« Previous | Revision 3/8 (diff) | Next »
Jamila Khan, 05/11/2017 01:43 PM
adding package install


Borg backups

This is documentation and scripts for using Borg backups with backupninja. This relies heavily on the work of Jon Goldberg, Benzhaomin, and Guillaume Subiron.

Install necessary packages, currently the best way to do that is by using jessie-backports.

aptitude -t jessie-backports install python3-msgpack borgbackup

The files borg, borglocal, borg.helper, and borglocal.helper should be placed in /usr/share/backupninja, permissions 644, owned by root:root.

cd /usr/share/backupninja
wget https://hq.palantetech.coop/attachments/download/7133/borg && wget https://hq.palantetech.coop/attachments/download/7135/borg.helper && wget https://hq.palantetech.coop/attachments/download/7136/borglocal && wget https://hq.palantetech.coop/attachments/download/7134/borglocal.helper
chown root:root borg* && chmod 644 borg*

The files 70-76 are example backupninja jobs, which would go in /etc/backup.d, permissions 600, owned by root:root.

cd /etc/backup.d
wget https://hq.palantetech.coop/attachments/download/7130/70-local.borglocal
wget https://hq.palantetech.coop/attachments/download/7132/71-mfpl.borg
wget https://hq.palantetech.coop/attachments/download/7138/75-borglocalbackupcheck.sh
wget https://hq.palantetech.coop/attachments/download/7137/76-borgbackupcheck.sh
chown root:root 7* && chmod 600 7*

Job 70 is for backing up to a usb drive, which will be mounted at the beginning of every job and unmounted at the end.
Necessary variables to change: device uuid, filesystem type, included and excluded files, directory to mount the usb drive to, passphrase

Job 71 is for backing up to either a local folder or a folder accessible by ssh on a remote host.
Necessary variables to change: included and excluded files, directory to put the backups in, host, ssh user, passphrase

Jobs 75 and 76 are for checking the viability of the job 70 and 71 backups respectively, and require coping over the variables from those jobs.

Please change the passphrase variable in these jobs to something other than "PASSPHRASE", or leave it empty, which will turn off encryption.

documentation:
https://0xacab.org/riseuplabs/backupninja/merge_requests/1
https://labs.riseup.net/code/projects/backupninja
https://borgbackup.readthedocs.io/en/stable/

Updated by Jamila Khan over 7 years ago · 3 revisions

Also available in: PDF HTML TXT

Go to top