backup jobs for forgejo

This commit is contained in:
Chris Toph 2025-01-22 17:33:15 -05:00
parent c94db74393
commit dcffe848e8
2 changed files with 19 additions and 10 deletions

View file

@ -1,11 +1,13 @@
{ {
services.cron = { services.cron = {
enable = true; enable = true;
systemCronJobs = [ systemCronJobs = [
# Runs snapraid-runner every day at 3am # Runs snapraid-runner every day at 3am
"0 3 * * * root snapraid-runner" "0 3 * * * root snapraid-runner"
# Runs a backup of the Docker storage directory every Monday at 4am # Runs a backup of the Docker storage directory every Monday at 4am
"0 4 * * 0 root tar -Pzcf /pool/Backups/DockerStorage/DockerStorage.tar.gz -C /mnt/drive1/DockerStorage ." "0 4 * * 0 root tar -Pzcf /pool/Backups/DockerStorage/DockerStorage.tar.gz -C /mnt/drive1/DockerStorage ."
]; # Runs a backup of the forgejo directory every 2 days at 4am
}; "0 4 */2 * * root tar -Pzcf /pool/Backups/forgejo/forgejo.tar.gz -C /pool/forgejo ."
];
};
} }

View file

@ -9,3 +9,10 @@ rotate 4
nocompress nocompress
su root root su root root
} }
"/pool/Backups/forgejo/forgejo.tar.gz" {
daily
rotate 20
nocompress
su root root
}