Compare commits

..

7 Commits

Author SHA1 Message Date
John Lancaster
e6f5ee38e5 added crond command for reference 2024-06-15 15:11:26 -05:00
John Lancaster
cf63a16f6b readme update 2024-06-15 15:11:26 -05:00
John Lancaster
97757bff44 readme update 2024-06-15 15:11:26 -05:00
John Lancaster
a6c089a191 did away with the inotifyd nonsense 2024-06-15 15:11:26 -05:00
John Lancaster
7123ccada7 added notes for the key 2024-06-15 15:11:26 -05:00
John Lancaster
4c8b57dd16 initial move to resticprofile 2024-06-15 15:11:26 -05:00
John Lancaster
326d2c0910 added to gitignore 2024-06-15 15:08:05 -05:00
4 changed files with 23 additions and 4 deletions

View File

@@ -2,6 +2,9 @@
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
@@ -42,6 +45,9 @@ 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 |
@@ -62,3 +68,17 @@ 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
- 'crond && resticprofile-schedule.sh && inotifyd resticprofile-schedule.sh /etc/resticprofile:w' - 'resticprofile-schedule.sh && crond -f'
env_file: env_file:
- .env - .env
hostname: ${HOSTNAME} hostname: ${HOSTNAME}

View File

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

View File

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