Compare commits
7 Commits
81bd1006cb
...
resticprof
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6f5ee38e5 | ||
|
|
cf63a16f6b | ||
|
|
97757bff44 | ||
|
|
a6c089a191 | ||
|
|
7123ccada7 | ||
|
|
4c8b57dd16 | ||
|
|
326d2c0910 |
20
README.md
20
README.md
@@ -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
|
||||||
|
```
|
||||||
|
|||||||
@@ -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}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
resticprofile unschedule
|
resticprofile unschedule > /dev/null
|
||||||
|
|
||||||
resticprofile schedule --all
|
resticprofile schedule --all
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user