Project

General

Profile

Borg backups » History » Version 2

Jamila Khan, 05/11/2017 12:56 PM

1 1 Jamila Khan
h1. Borg backups
2
3
This is documentation and scripts for using Borg backups with backupninja. This relies heavily on the work of "Jon Goldberg":https://github.com/PalanteJon, "Benzhaomin":https://0xacab.org/Benzhaomin, and "Guillaume Subiron":https://github.com/maethor.
4
5
The files borg, borglocal, borg.helper, and borglocal.helper should be placed in /usr/share/backupninja, permissions 644, owned by root:root.
6 2 Jamila Khan
7
<pre>
8
cd /usr/share/backupninja
9
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
10
chown root:root borg* && chmod 644 borg*
11
</pre>
12
13
14 1 Jamila Khan
The files 70-76 are example backupninja jobs, which would go in /etc/backup.d, permissions 600, owned by root:root.
15
16 2 Jamila Khan
<pre>
17
cd /etc/backup.d
18
wget https://hq.palantetech.coop/attachments/download/7130/70-local.borglocal
19
wget https://hq.palantetech.coop/attachments/download/7132/71-mfpl.borg
20
wget https://hq.palantetech.coop/attachments/download/7138/75-borglocalbackupcheck.sh
21
wget https://hq.palantetech.coop/attachments/download/7137/76-borgbackupcheck.sh
22
chown root:root 7* && chmod 600 7*
23
</pre>
24
25 1 Jamila Khan
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.
26 2 Jamila Khan
Necessary variables to change: device uuid, filesystem type, included and excluded files, directory to mount the usb drive to, passphrase
27
28 1 Jamila Khan
Job 71 is for backing up to either a local folder or a folder accessible by ssh on a remote host.
29 2 Jamila Khan
Necessary variables to change: included and excluded files, directory to put the backups in, host, ssh user, passphrase
30
31
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.
32 1 Jamila Khan
33
Please change the passphrase variable in these jobs to something other than "PASSPHRASE", or leave it empty, which will turn off encryption.
34
35
36
documentation:
37
https://0xacab.org/riseuplabs/backupninja/merge_requests/1
38
https://labs.riseup.net/code/projects/backupninja
39
https://borgbackup.readthedocs.io/en/stable/
Go to top