content:serverbasics:docker-backup
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.
| Beide Seiten, vorherige ÜberarbeitungVorherige ÜberarbeitungNächste Überarbeitung | Vorherige Überarbeitung | ||
| content:serverbasics:docker-backup [2025/03/26 17:35] – [UserIDs in the Borg-Backups] obel1x | content:serverbasics:docker-backup [2025/12/06 14:19] (aktuell) – [UserIDs in the Borg-Backups] obel1x | ||
|---|---|---|---|
| Zeile 11: | Zeile 11: | ||
| Create the Directory for your Backup- Scripts, e.g. / | Create the Directory for your Backup- Scripts, e.g. / | ||
| - | Inside that directory, create a file named " | + | Inside that directory, create a file named "'' |
| < | < | ||
| / | / | ||
| Zeile 38: | Zeile 37: | ||
| find "/ | find "/ | ||
| - | # TODO: remove | + | # Remove |
| + | sed -i '/ | ||
| + | |||
| + | # Make Postgres-Backup of Authentik | ||
| + | ../ | ||
| # Copy the file to NC-AIO | # Copy the file to NC-AIO | ||
| Zeile 59: | Zeile 62: | ||
| echo "The Log is:" | echo "The Log is:" | ||
| docker logs nextcloud-aio-borgbackup | docker logs nextcloud-aio-borgbackup | ||
| - | # And start the Containers | + | |
| + | # At this Point all Services should be shutdown despite | ||
| + | # while some services tend to hang sometimes, i now want to completely shutdown everything | ||
| + | / | ||
| + | / | ||
| + | # and even kill docker-service and restart again | ||
| + | systemctl --user restart docker | ||
| + | # now, restart first NC-AIO Mastercontainer for further jobs | ||
| + | cd / | ||
| + | / | ||
| + | |||
| + | # Start the NC-AOI Services by AIO | ||
| sleep 2 | sleep 2 | ||
| docker exec -it --env START_CONTAINERS=1 nextcloud-aio-mastercontainer / | docker exec -it --env START_CONTAINERS=1 nextcloud-aio-mastercontainer / | ||
| Zeile 77: | Zeile 91: | ||
| ===== Cronjob ===== | ===== Cronjob ===== | ||
| - | Use '' | + | Frist, |
| < | < | ||
| - | 0 1 * * * / | + | |
| + | # | ||
| + | cd / | ||
| + | ./ | ||
| + | cat docker_backup_cron.log | ||
| </ | </ | ||
| - | ===== UserIDs in the Borg-Backups ===== | + | |
| + | Use '' | ||
| + | < | ||
| + | 0 3 * * * / | ||
| + | |||
| + | </ | ||
| + | |||
| + | Thats all. Make sure, you recieve Mails for this user. | ||
| + | |||
| + | ===== Restore and UserIDs in the Borg-Backups ===== | ||
| Mind, that Borg will store the UID/GID of some file/ | Mind, that Borg will store the UID/GID of some file/ | ||
| - | So you cannot restore the Files on your Host an hope, that this will work. To restore these archives, you need (again) a running Nextcloud- AIO and restore the files from that borg- container, that is included there. | + | So you cannot restore the Files on your Host and hope, that this will work. To restore these archives, you need (again) a running Nextcloud- AIO and restore the files from that borg- container, that is included there. |
| + | < | ||
| + | < | ||
| + | |||
| + | And DO NOT THINK YOU CAN SET USERS MANUALLY LATER on the Hosts Volumes ! → some containers, like FreeIPA do include non-relative symlinks in their data, even pointing to Files on your Host when looking at them from your Host. If you chown them, than HOST SYSTEMFILES will get messed up, maybe rendering your whole Server unusable! | ||
| + | |||
| + | For making restore of Docker- Volumes easy, check out this community-container: | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | This will do the mounts and will make it easy to copy files from borg backup to the volumes. | ||
content/serverbasics/docker-backup.1743006958.txt.gz · Zuletzt geändert: von obel1x
