backups: only run restic prune on the last backup

After this change, only obs-portal backup will prune the repository of
old snapshots. This is the last backup service to run at 06:00 AM UTC.

This should avoid our nightly backups failing because of the exclusive
lock on the restic repo. We currently start the next backup while the
previous one is still pruning, which makes the newly started one fail
with:

repo already locked, waiting up to 0s for the lock
unable to create lock in backend: repository is already locked by PID 228…
This commit is contained in:
teutat3s 2025-04-02 13:17:22 +02:00
parent 6f195ac05a
commit a08003f125
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1
7 changed files with 0 additions and 35 deletions
modules
forgejo
keycloak
mailman
mastodon
matrix
mediawiki
nextcloud

View file

@ -197,10 +197,5 @@
backupCleanupCommand = ''
rm /tmp/forgejo-backup.sql
'';
pruneOpts = [
"--keep-daily 7"
"--keep-weekly 4"
"--keep-monthly 3"
];
};
}

View file

@ -71,11 +71,6 @@
backupCleanupCommand = ''
rm /tmp/keycloak-backup.sql
'';
pruneOpts = [
"--keep-daily 7"
"--keep-weekly 4"
"--keep-monthly 3"
];
};
};
}

View file

@ -93,10 +93,5 @@
initialize = true;
passwordFile = config.age.secrets."restic-repo-storagebox-nachtigall".path;
repository = "sftp:u377325@u377325.your-storagebox.de:/backups";
pruneOpts = [
"--keep-daily 7"
"--keep-weekly 4"
"--keep-monthly 3"
];
};
}

View file

@ -132,10 +132,5 @@
backupCleanupCommand = ''
rm /tmp/mastodon-backup.sql
'';
pruneOpts = [
"--keep-daily 7"
"--keep-weekly 4"
"--keep-monthly 3"
];
};
}

View file

@ -354,11 +354,6 @@ in
rm /tmp/matrix-synapse-backup.sql
rm /tmp/matrix-authentication-service-backup.sql
'';
pruneOpts = [
"--keep-daily 7"
"--keep-weekly 4"
"--keep-monthly 3"
];
};
};
}

View file

@ -255,10 +255,5 @@ in
backupCleanupCommand = ''
rm /tmp/mediawiki-backup.sql
'';
pruneOpts = [
"--keep-daily 7"
"--keep-weekly 4"
"--keep-monthly 3"
];
};
}

View file

@ -285,10 +285,5 @@
backupCleanupCommand = ''
rm /tmp/nextcloud-backup.sql
'';
pruneOpts = [
"--keep-daily 7"
"--keep-weekly 4"
"--keep-monthly 3"
];
};
}