forked from jjlin/vaultwarden-backup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
crontab
17 lines (13 loc) · 828 Bytes
/
crontab
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Backup Vaultwarden data hourly.
@hourly ${HOME}/vaultwarden/backup/cron.sh
# Backup Vaultwarden data hourly, using Healthchecks.io (https://healthchecks.io/) to monitor for failures.
# This is just an example of using a cron monitoring service.
# @hourly ${HOME}/vaultwarden/backup/cron.sh && curl -fsS -m 10 --retry 5 -o /dev/null https://hc-ping.com/<your-uuid>
# Purge old local backups.
@daily find "${HOME}/vaultwarden/backup/archives" -name 'vaultwarden-*.tar.*' -mtime +14 -delete
# Purge old log files.
@daily find "${HOME}/vaultwarden/backup/logs" -name '*.log' -mtime +14 -delete
# Vacuum the database daily at 3:30 am.
# This avoids contention with other scheduled jobs that run at
# :00 minutes (backups) or :05 minutes (e.g., trash/send purging).
30 3 * * * sqlite3 ${HOME}/vaultwarden/data/db.sqlite3 VACUUM