Creating a Backup
Backup instructions will vary based on whether or not you are using an external database. Use
the procedures shown below to create a backup that will include the volume data for your
deployment under the name my-srm-backup
.
Backup without an External Database
To create a backup without an external database:
- Stop your containers using the Docker Compose
down
command for your deployment.docker-compose -f /path/to/your-docker-compose-file down
- Open a terminal window and change the directory to your
srm-docker
GitHub repository.cd /path/to/srm-docker
- Run the
backup.ps1
script by specifying a backup name (e.g.,my-srm-backup
) and the path to your Docker Compose file.pwsh ./scripts/backup.ps1 -BackupName my-srm-backup -ComposeConfigPath /path/to/your-docker-compose-file
Note: Specify a project name using the-p
parameter, if necessary. - Verify that you see the following message indicating a successful backup:
Successfully created backup <backup-name>
Backup with an External Database
To create a backup with an external database:
- Stop your containers using the Docker Compose
down
command for your deployment.docker-compose -f /path/to/your-docker-compose-file down
- Open a terminal window and change the directory to your
srm-docker
GitHub repository.cd /path/to/srm-docker
- Run the
backup.ps1
script by specifying a backup name (e.g.,my-srm-backup
), the path to your Docker Compose file, and the name of your web volume (you can list volumes with thedocker volume ls
command).pwsh ./scripts/backup.ps1 -BackupName my-srm-backup -AppDataVol srm-docker_codedx-appdata-ex-db-volume -ComposeConfigPath /path/to/your-docker-compose-file
Note: Specify a project name using the-p
parameter, if necessary. - Verify that you see this message indicating a successful backup:
Successfully created backup <backup-name>
- Back up your external database.