[GeoNode-users] backup the Geoserver and DB containers of the Docker cluster
tappoz84 at yahoo.it
Sat Jan 2 07:45:43 PST 2021
Hi all - happy new year!
I am trying to backup a Docker cluster with the scripts provided at https://github.com/GeoNode/geonode-project#backup-and-restore-from-docker-images
I think I successfully ran the backup for the django app, but I am not sure how could I backup all the other running containers? I am mainly interested in the DB container and the Geoserver container.
I've run this command:
docker exec -it django4myOwnProject2020 sh -c 'SOURCE_URL=$SOURCE_URL TARGET_URL=$TARGET_URL ./myOwnProject2020/br/backup.sh $BKP_FOLDER_NAME'
And I can see in the output logs the script has done something.
See here from inside the container:
docker exec -it django4myOwnProject2020 sh -c 'ls -lah /backup_restore'total 40Mdrwxr-xr-x 2 root root 4.0K Jan 2 15:08 .drwxr-xr-x 1 root root 4.0K Dec 31 15:18 ..-rw-r--r-- 1 root root 723 Jan 2 15:08 2021-01-02_150751.ini-rw-r--r-- 1 root root 70 Jan 2 15:08 2021-01-02_150751.md5-rw-r--r-- 1 root root 40M Jan 2 15:08 2021-01-02_150751.zip
and here in the file system of my laptop:
sudo ls -lah /var/lib/docker/volumes/myOwnProject2020-backup-restore/_datatotal 40Mdrwxr-xr-x 2 root root 4.0K Jan 2 15:08 .drwxr-xr-x 3 root root 4.0K Dec 30 15:00 ..-rw-r--r-- 1 root root 723 Jan 2 15:08 2021-01-02_150751.ini-rw-r--r-- 1 root root 70 Jan 2 15:08 2021-01-02_150751.md5-rw-r--r-- 1 root root 40M Jan 2 15:08 2021-01-02_150751.zip
But that script "./myOwnProject2020/br/backup.sh" is not for example in the DB container or the Geoserver container? Why is it not there?
Also I am not sure if and how I should populate those two environment variables SOURCE_URL and TARGET_URL.Looking at the docs it seems I should put in there "localhost" (I am running the cluster locally on my laptop), but the script seems to have backed up the django container anyway so I am not sure if I need to touch them at all. Should I change those variable? What should I put in there?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the geonode-users