System Back up Restore
Click the link above if you are not automatically redirected in 10 seconds.
GroundWork Monitor 8 is comprised of containers and data. All data is on volumes that can be easily backed up and transferred, and restored. Containers are ephemeral, and can be installed as many times as needed using the installer, or (when enabled) using Docker commands over the internet. Backups can only be loaded from the /tmp
directory which is also where they are created by default, though you can also use a different mount point.
Backups for version GW8 created
Backups are only assured to work with the version of GW8 they were created with. If backups made from previous versions are restored, migrations will have to be run again by reinstalling more recent versions of GW8 afterward.
Back Up
- To back up the GroundWork data volumes to your
/tmp
directory, first ensure there is plenty of space for the backup in/tmp
. Change to the
gw8
directory:cd gw8
Take GroundWork down:
docker-compose down
Set up and run the backup in the
gw8
container with the following command:TAG=$(grep '^TAG=' .env | sed 's/^TAG=//') docker run --rm \ -v /var/run/docker.sock:/var/run/docker.sock \ -v ${HOME}/.docker:/root/.docker \ -v /tmp:/tmp/tmp \ --name gw8 groundworkdevelopment/gw8:${TAG} \ /src/docker_cmd.sh backupVolumes
The resulting file name is of the form of
/tmp/dockergw8_backup_{timestamp}.tar.gz
, e.g.,/tmp/dockergw8_backup_20191128231820.tar.g
z.Note regarding /tmp directory
If your
/tmp
directory is too small to contain what could potentially be hundreds of gigabytes, you can map to a larger partition by changing the -v option. For example, if you have a volume called "backups" where you want to send the backup file, change:-v /tmp:/tmp/tmp \
to
-v /backups:/tmp/tmp \
Similarly, you would change the restore command below to point to the same location.
Bring GroundWork up:
docker-compose up -d
Restore
- First make sure you have a running install of a version of GroundWork Monitor that is compatible with your backup.
- To restore, place the backup
.tar.gz
file you want to restore in the/tmp
directory on the host (this is where the container loads it from):Change to the
gw8
directory:cd gw8
Take GroundWork down:
docker-compose down
Set up and run the restore from the
gw8
container with the following command:TAG=$(grep '^TAG=' .env | sed 's/^TAG=//') docker run --rm \ -v /var/run/docker.sock:/var/run/docker.sock \ -v ${HOME}/.docker:/root/.docker \ -v /tmp:/tmp/tmp \ --name gw8 groundworkdevelopment/gw8:${TAG} \ /src/docker_cmd.sh restoreVolumes /tmp/dockergw8_backup_{timestamp}.tar.gz
Bring GroundWork up:
docker-compose up -d
Related articles
-
Database Back up Restore (Documentation)