mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-21 02:40:09 +00:00
Docs: clarify filtering of archives during borg backup pruning
Clarify the retention policy adjustment instructions by mentioning to not include the '-a' or '--glob-archives' option. I recently included in the retention policy env variable, and it lead to a pruning error due to the duplicate `-a` ... `--glob-archives` options. I added it because I didn't know that AIO already filtered archives in the borg repo during pruning, and I was worried that it would prune out other non-Nextcloud-AIO backups in the repo. I added a very similar glob myself, so just omitting what I added was the solution for my problem. As an alternative to this edit, I was thinking that Nextcloud AIO's default filtering behavior could be clarified elsewhere is a positive way. Two ideas: 1. Modify the start of the retention policy FAQ, like: After a backup, AIO prunes your borg archives with the `--glob-archives '*_*-nextcloud-aio'` option, so that it does not affect archives unrelated to AIO. The built-in retention policy is `--keep-within=7d --keep-weekly=4 --keep-monthly=6`. [...] 2. Or perhaps, there can be another FAQ question about backups, like "Will Nextcloud AIO touch other backups in my borg repository?" or "Can I use my borg repository for backups unrelated to Nextcloud AIO?", with the answer: No/Yes, AIO internally uses the borg `--glob-archives '*_*-nextcloud-aio'` option to only prune AIO archives, so Nextcloud AIO will not affect archives/backups unrelated to AIO. Be careful that other systems don't prune your AIO archives, however. Signed-off-by: Thor Galle <thorgalle@gmail.com>
This commit is contained in:
@@ -856,7 +856,7 @@ Be aware that this solution does not back up files and folders that are mounted
|
||||
Backed up will get all important data of your Nextcloud AIO instance required to restore the instance, like the database, your files and configuration files of the mastercontainer and else. Files and folders that are mounted into Nextcloud using the external storage app are not getting backed up. There is currently no way to exclude the data directory because it would require hacks like running files:scan and would make the backup solution much more unreliable (since the database and your files/folders need to stay in sync). If you still don't want your datadirectory to be backed up, see https://github.com/nextcloud/all-in-one#how-to-enable-automatic-updates-without-creating-a-backup-beforehand for options (there is a hint what needs to be backed up in which order).
|
||||
|
||||
### How to adjust borgs retention policy?
|
||||
The built-in borg-based backup solution has by default a retention policy of `--keep-within=7d --keep-weekly=4 --keep-monthly=6`. See https://borgbackup.readthedocs.io/en/stable/usage/prune.html for what these values mean. You can adjust the retention policy by providing `--env BORG_RETENTION_POLICY="--keep-within=7d --keep-weekly=4 --keep-monthly=6"` to the docker run command of the mastercontainer (but before the last line `ghcr.io/nextcloud-releases/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) and customize the value to your fitting. ⚠️ Please make sure that this value is valid, otherwise backup pruning will bug out!
|
||||
The built-in borg-based backup solution has by default a retention policy of `--keep-within=7d --keep-weekly=4 --keep-monthly=6`. See https://borgbackup.readthedocs.io/en/stable/usage/prune.html for what these values mean. You can adjust the retention policy by providing `--env BORG_RETENTION_POLICY="--keep-within=7d --keep-weekly=4 --keep-monthly=6"` to the docker run command of the mastercontainer (but before the last line `ghcr.io/nextcloud-releases/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) and customize the value to your fitting. ⚠️ Please make sure that this value is valid, otherwise backup pruning will bug out! Also, don't include the `-a` or `--glob-archives` option, since AIO [already provides it](https://github.com/nextcloud/all-in-one/blob/58e5d8534b115614c9333966694ac767ecb9a6d9/Containers/borgbackup/backupscript.sh#L236) and you can't overide it.
|
||||
|
||||
### How to migrate from AIO to AIO?
|
||||
If you have the borg backup feature enabled, you can copy it over to the new host and restore from the backup. This guide assumes the new installation data dir will be on `/mnt/datadir`, you can adjust the steps if it's elsewhere.
|
||||
|
||||
Reference in New Issue
Block a user