Benutzer-Werkzeuge

Webseiten-Werkzeuge


content:serverbasics:docker-backup

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.

Link zu der Vergleichsansicht

Beide Seiten, vorherige ÜberarbeitungVorherige Überarbeitung
Nächste Überarbeitung
Vorherige Überarbeitung
content:serverbasics:docker-backup [2025/04/14 21:21] – [Setup Scripts] obel1xcontent:serverbasics:docker-backup [2025/12/06 14:19] (aktuell) – [UserIDs in the Borg-Backups] obel1x
Zeile 88: Zeile 88:
  
 Thats the whole Backup-Script. Thats the whole Backup-Script.
- 
  
 ===== Cronjob ===== ===== Cronjob =====
  
 Frist, create another file in that Directory e.g. /home/docker/docker_compose/backup/docker_backup_cron.sh with the contents: Frist, create another file in that Directory e.g. /home/docker/docker_compose/backup/docker_backup_cron.sh with the contents:
- 
 <file> <file>
 +
 #!/bin/bash #!/bin/bash
 cd /home/docker/docker_compose/backup cd /home/docker/docker_compose/backup
Zeile 103: Zeile 102:
  
 Use ''crontab -e'' to create the cronjob for user docker on your host: Use ''crontab -e'' to create the cronjob for user docker on your host:
-<code>0 3 * * * /home/docker/docker_compose/backup/docker_backup_cron.sh+<code> 
 +0 3 * * * /home/docker/docker_compose/backup/docker_backup_cron.sh
  
 </code> </code>
Zeile 109: Zeile 109:
 Thats all. Make sure, you recieve Mails for this user. Thats all. Make sure, you recieve Mails for this user.
  
- +===== Restore and UserIDs in the Borg-Backups =====
-===== UserIDs in the Borg-Backups =====+
  
 Mind, that Borg will store the UID/GID of some file/directory from inside running docker- container. That means, that if the file on the host has some SubUID, like e.g. UID = 165568, the file seen from inside the container can be UID = 33, which could be the container- user named "www-data". Mind, that Borg will store the UID/GID of some file/directory from inside running docker- container. That means, that if the file on the host has some SubUID, like e.g. UID = 165568, the file seen from inside the container can be UID = 33, which could be the container- user named "www-data".
  
-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
 + <font 16px/inherit;;#ff0000;;inherit>**AGAIN, THIS IS VERY IMPORTANT: DO NOT TRY TO OPEN BORG-BACKUPS ON THE HOST AND RESTORE THEM FROM THERE To YOUR DOCKER- VOLUMES !!!**</font> 
 + <font 16px/inherit;;#ff0000;;inherit>**YOU WILL MESS UP THE PERMISSIONS IN THE CONTAINER !**</font> 
 + 
 +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://github.com/nextcloud/all-in-one/tree/main/community-containers/borgbackup-viewer|https://github.com/nextcloud/all-in-one/tree/main/community-containers/borgbackup-viewer]] 
 + 
 +This will do the mounts and will make it easy to copy files from borg backup to the volumes.
  
  
content/serverbasics/docker-backup.1744658490.txt.gz · Zuletzt geändert: von obel1x

Falls nicht anders bezeichnet, ist der Inhalt dieses Wikis unter der folgenden Lizenz veröffentlicht: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki