summaryrefslogtreecommitdiff
path: root/.local/bin/backups/borg-offsite
blob: dfc9c019cad85874f0d8fe46213a15a01f5fb76c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
# Full system backup with Borg

# Backup root partition
sudo borg create --verbose --list --stats --show-rc --exclude-caches --one-file-system \
			--exclude '/dev/*' 		\
			--exclude '/proc/*' 	\
			--exclude '/sys/*'		\
			--exclude '/tmp/*'		\
			--exclude '/mnt/*'		\
			--exclude '/media/*'	\
			"/mnt/offsite-backup/titan::root-{now:%Y-%m-%d}" /

# Backup boot parition
sudo borg create --verbose --list --stats --show-rc --exclude-caches --one-file-system \
			"/mnt/offsite-backup/titan::boot-{now:%Y-%m-%d}" /boot

# Backup home partition
sudo borg create --verbose --list --stats --show-rc --exclude-caches --one-file-system \
			"/mnt/offsite-backup/titan::home-{now:%Y-%m-%d}" /home

# Backup var partition
sudo borg create --verbose --list --stats --show-rc --exclude-caches --one-file-system \
			"/mnt/offsite-backup/titan::var-{now:%Y-%m-%d}" /var