⚠ Potential optimization we should consider: Put ReSeeD into read-only mode using the admin web interface before creating the backup, und disable read-only mode again after the instance has been started with the new image (but before any manual migrations have been performed). Possible issue: If the new reseed images perform some automatic migration steps on first start, those might collide with read-only mode still being enabled at this point.
## Stop ReSeeD instance
Execute as user `reseed` on the VM on which your `ReSeeD` instance is running:
```shell
cd reseed
docker compose -f docker-compose.yml down
```
## Backup `volumes` directory
This step is specific to each ReSeeD instance. For example, you could do something like
```shell
# This requires root because most files and directories will be owned by other user IDs
sudo cp-a volumes volumes_OLD_IMAGE_ID
```
## Determine updates to the `.env` file
This is done by checking the git history of the `.env.template` file in the respective branch of the ReSeeD git repo from which you built your container images.
## Update and execute `create_volume_directories.sh`
Update the `create_volume_directories.sh` script to the version from the ReSeeD git branch from which you built the container images that you are deploying. Then execute the script:
```shell
./create_volume_directories.sh
```
## Determine updates to the `docker-compose.yml` file
This is done by checking the git history of the `docker-compose.yml` file in the respective branch of the ReSeeD git repo from which you built your container images.
In general, this step should take between 2 and 5 minutes. A good indicator/rule of thumb is to watch `top` and wait until no processes with more than 10% of CPU load are running for at least 10 seconds.