Compare commits

..

2 Commits

Author SHA1 Message Date
John Lancaster
81bd1006cb added notes for the key 2024-06-15 14:18:08 -05:00
John Lancaster
18b53fe103 initial move to resticprofile 2024-06-15 14:12:15 -05:00
4 changed files with 4 additions and 23 deletions

View File

@@ -2,9 +2,6 @@
Purpose: Purpose:
> [!WARNING]
> This behvior does not work on the `resticprofile` branch
- Wrap `restic` with the ability to start/stop Docker containers - Wrap `restic` with the ability to start/stop Docker containers
- Send updates to Loki server - Send updates to Loki server
@@ -45,9 +42,6 @@ sudo chown root:root ./restic-scripts/key && sudo chmod 600 ./restic-scripts/key
## Loki Updates ## Loki Updates
> [!WARNING]
> This doesn't currently work on the `resticprofile` branch
Updates sent to Loki will have the following labels: Updates sent to Loki will have the following labels:
| Label | Description | | Label | Description |
@@ -68,17 +62,3 @@ Dry-run a backup
```shell ```shell
docker compose exec backup resticprofile --dry-run backup docker compose exec backup resticprofile --dry-run backup
``` ```
Check crontab entry in container
```shell
docker compose exec backup cat /var/spool/cron/crontabs/root
```
### Crond
Crond command when scheduled using `resticprofile schedule --all`
```shell
cd /resticprofile && /usr/bin/resticprofile --no-ansi --config /etc/resticprofile/profiles.yaml --name default backup
```

View File

@@ -4,7 +4,7 @@ services:
entrypoint: '/bin/sh' entrypoint: '/bin/sh'
command: command:
- -c - -c
- 'resticprofile-schedule.sh && crond -f' - 'crond && resticprofile-schedule.sh && inotifyd resticprofile-schedule.sh /etc/resticprofile:w'
env_file: env_file:
- .env - .env
hostname: ${HOSTNAME} hostname: ${HOSTNAME}

View File

@@ -1,3 +1,4 @@
global: global:
scheduler: crond scheduler: crond
@@ -12,7 +13,7 @@ default:
one-file-system: true one-file-system: true
schedule: "*:00" schedule: "*:00"
schedule-permission: system schedule-permission: system
check-after: true check-before: true
tag: tag:
- resticprofile - resticprofile

View File

@@ -2,7 +2,7 @@
set -e set -e
resticprofile unschedule > /dev/null resticprofile unschedule
resticprofile schedule --all resticprofile schedule --all