I'm a beginner looking for a straightforward backup solution for my Docker data on Ubuntu. Is it possible to use standard Linux backup software to back up my Docker volumes and data? If that's not the way to go, what alternatives do you recommend? Also, if there's a way to include cloud storage for the backup files, that would be great!
2 Answers
There are a couple of ways to handle this. If your data isn't from a database, simply mount a volume and store your data there. For database containers, you might consider using a cron job to run a backup script inside the container, or you could look into using a backup image like tiredofit/docker-backup, which integrates smoothly with Docker Compose if you're using it.
You can go the rsync route. Just make sure your persistent data is mounted from your host, then you can easily rsync that directory somewhere for safekeeping. If you want a bit more sophistication, consider creating a gzipped tarball of your data periodically, then rsync those instead.

Absolutely! For databases, it's essential to ensure that your data files are on a mounted volume. Remember, containers should generally be stateless, so keep persistent data outside of them!