M README.md +20 -2
@@ 27,14 27,32 @@ This is based on directory structures in
- /etc/backup
- /etc/backup/environment
- /etc/backup/paths
+- /etc/backup/excludes
- /lib/systemd/system/backup.service
- /lib/systemd/system/backup.timer
- /lib/systemd/system/backup-prune.service
- /lib/systemd/system/backup-prune.timer
-Steps
------
+Steps (as user)
+---------------
+
+If you want to back up your home directory as a user, you don't need to install all of this as root. The simple way is:
+
+```
+# Get this repository; say it lives in $PWD/restic-backup/
+mkdir .config/restic
+cp restic-backup/{environment,paths,excludes} .config/restic/
+mkdir -p .config/systemd/user
+cp restic-backup/backup*{service,timer} .config/systemd/user/
+# Edit environment, paths, and excludes appropriately
+systemctl enable backup.timer
+systemctl enable backup-prune.timer
+```
+
+
+Steps (as root)
+---------------
### 1. Set up your Backblaze account
M backup.service +1 -1
@@ 5,7 5,7 @@ After=network.target
[Service]
EnvironmentFile=/etc/backup/environment
Type=simple
-ExecStart=/usr/local/bin/restic backup --files-from ${FILES} --cache-dir ${RESTIC_CACHE_DIR}
+ExecStart=/usr/local/bin/restic backup --files-from ${FILES} --exclude-file ${EXCLUDES} --cache-dir ${RESTIC_CACHE_DIR} --one-file-system
[Install]
WantedBy=multi-user.timer
M environment +1 -0
@@ 3,6 3,7 @@ B2_ACCOUNT_KEY=YOUR_B2_BUCKET_KEY_SECRET
RESTIC_REPOSITORY=b2:name-of-your-backup:restic
RESTIC_PASSWORD="Really secure password goes here."
RESTIC_CACHE_DIR=/var/cache/restic
+EXCLUDES=/etc/backup/excludes
FILES=/etc/backup/paths
KEEP_DAILY=7
KEEP_MONTHLY=3