> For the complete documentation index, see [llms.txt](https://dev-notes.vinguyen.blog/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev-notes.vinguyen.blog/notes/deployment-and-operation/docker-container/backup-container.md).

# Backup Container

```
sudo docker commit -p <container_id> my_backup
```

Save Backup to file

```
sudo docker save -o ~/my-backup.tar my_backup
```

**Ref**

* <https://www.geeksforgeeks.org/backing-up-a-docker-container/>
