wyoming, borg, grayjay, oh my
All checks were successful
Reese's Arch Toolbox / build-and-push-arch-toolbox (push) Successful in 9m54s
All checks were successful
Reese's Arch Toolbox / build-and-push-arch-toolbox (push) Successful in 9m54s
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
# Borg Backup
|
||||
|
||||
- [Borg Backup](#borg-backup)
|
||||
- [Server Setup](#server-setup)
|
||||
- [Adding a Client](#adding-a-client)
|
||||
- [Installing the Backup Service](#installing-the-backup-service)
|
||||
- [Adding Nextcloud](#adding-nextcloud)
|
||||
|
||||
## Server Setup
|
||||
|
||||
<https://borgbackup.readthedocs.io/en/stable/deployment/central-backup-server.html#user-and-group>
|
||||
@@ -28,7 +34,7 @@ Note: See [adding nextcloud](#adding-nextcloud) for nextcloud instructions here.
|
||||
```bash
|
||||
export BACKUP_HOST=""
|
||||
|
||||
ssh-keygen -C backup@${BACKUP_HOST} -f ~/.ssh/id_${BACKUP_HOST}
|
||||
ssh-keygen -C ${USER}@${HOSTNAME} -f ~/.ssh/id_${BACKUP_HOST}
|
||||
|
||||
cat <<EOF >> ~/.ssh/config
|
||||
Host ${BACKUP_HOST}
|
||||
@@ -58,7 +64,43 @@ Then back on the client:
|
||||
```bash
|
||||
ssh borg.reeselink.com
|
||||
|
||||
# root
|
||||
borg init --encryption none backup@${BACKUP_HOST}:root
|
||||
# home
|
||||
borg init --encryption none backup@${BACKUP_HOST}:home
|
||||
# app
|
||||
borg init --encryption none backup@${BACKUP_HOST}:gitea
|
||||
# another app
|
||||
borg init --encryption none backup@${BACKUP_HOST}:nextcloud
|
||||
```
|
||||
|
||||
### Installing the Backup Service
|
||||
|
||||
Create your vars file in `secrets/host_vars.yaml`
|
||||
|
||||
```yaml
|
||||
repo_name: my_repo
|
||||
borg_user: backup
|
||||
borg_host: borg.reeselink.com
|
||||
borg_passphrase: ""
|
||||
backup_dirs:
|
||||
- /home
|
||||
exclude_dirs: []
|
||||
keep_daily: 7
|
||||
keep_weekly: 4
|
||||
keep_monthly: 1
|
||||
stop_services: []
|
||||
stop_user_services:
|
||||
- gitea
|
||||
- postgres
|
||||
```
|
||||
|
||||
```bash
|
||||
ansible-playbook \
|
||||
-i active/ansible/inventory.yaml \
|
||||
-l podman \
|
||||
active/systemd_borg/install_backup.yaml \
|
||||
-e "@active/systemd_borg/secrets/gitea_vars.yaml"
|
||||
```
|
||||
|
||||
#### Adding Nextcloud
|
||||
|
||||
Reference in New Issue
Block a user