

docker container restart <CONTAINER_NAME> to restart a containerdocker compose restart to restart all compose containerssudo shutdown -r now to restart the whole serverdocker run -d --name my_todoapp -p 8000:8000 -v todo_db:/data prologic/todohttp://<<YOUR_SERVER>>:8000SSH into the server, then:
sudo apt install rsync
# Identify Docker volumes
ls /var/lib/docker/volumes
# Then, disconnect from your server
exit
Then, to copy the volume data to your local computer: (On a Mac? run brew install rsync)
rsync -aP root@<YOUR_DOMAIN>:/var/lib/docker/volumes/todo_db .
Or, on your server:
sudo cp -r /var/lib/docker/volumes/todo_db ~/todo_db
rsync <flags> <source> <destination><server>:<path> or <local path>On your server:
# Stop the app
docker container stop my_todoapp
# Delete the app container
docker container rm my_todoapp
docker container ls
docker volume ls
# Delete the app volume
docker volume rm todo_db
docker volume ls
docker run -d --name my_todoapp -p 8000:8000 -v todo_db:/data prologic/todohttp://<SERVER>:8000Choose an option:
# Option A: Copy data from your local environment
rsync -aP todo_db root@<YOUR_SERVER>:/var/lib/docker/volumes/
# Option B: restore data from the copy on the server
sudo cp -r ~/todo_db /var/lib/docker/volumes/
Then:
sudo chown -R $USER:$USER /var/lib/docker/volumes/todo_db
# Restart the service
docker container restart my_todoapp
Then, check that it’s restored at http://<SERVER>:8000
docker run --name nginx -v content:/usr/share/nginx/html -p 8080:80 -d nginx:1.26http://<YOUR_SERVER>:8080/errordocker cp /etc/motd nginx:/usr/share/nginx/html/motd.htmlhttp://<YOUR_SERVER>:8080/motd.html# Stop the service
docker container stop nginx
# Remove the old version
docker container rm nginx
# Launch an updated version of the service
docker run --name nginx -v content:/usr/share/nginx/html \
-p 8080:80 -d nginx:1.29
Then, confirm that the content is available at http://<YOUR_SERVER>:8080/motd.html, and check the version at http://<YOUR_SERVER>:8080/error






services:
server:
image: docker.gitea.com/gitea:nightly
container_name: gitea
environment:
- GITEA__database__DB_TYPE=postgres
- GITEA__database__HOST=db:5432
restart: always
networks:
- gitea
volumes:

nano ~/.ssh/configHost <YOUR_SERVER>.autonomous.rodeo
Hostname <YOUR_SERVER>.autonomous.rodeo
User root
IdentityFile ~/.ssh/<YOUR_SSH_PRIVATE_KEY>
ssh <YOUR_SERVER>.autonomous.rodeossh-keygen -p
./.ssh/<YOUR_PRIVATE_KEY_NAME>abra app new backup-bot-twoabra app config <APP_NAME>abra app secret generate -a <BACKUPBOT_NAME>abra app deploy <APP_NAME>abra app lsabra app ls -Sabra app run <APP_NAME> app backup --host <YOUR_SERVER>.autonomous.rodeo createabra app run <APP_NAME> app backup --host <YOUR_SERVER>.autonomous.rodeo snapshotsRestore a snapshot
abra app run <APP_NAME> app backup \
--host <YOUR_SERVER>.autonomous.rodeo \
restore \
--snapshot fea04a7c064452b730445d81027ba185aa6626536b2c929d7a7c9fdc998b28c6