Jump to content

(SOLVED) Is this a good way to backup docker installations?


je82

Recommended Posts

Hi,

 

I've just recently started exploring the docker universe and it's pretty handy with all the easily accessible applications in there! I find myself consolidating more and more stuff into dockers and i'm already up to 12 of them now. I need a backup solution.

 

I store the docker configuration data in /mnt/user/appdata/*

Can i simply just include the /mnt/user/appdata/* path in my rsync backup script and that's that? Or am i going to run into trouble if i do it like that?

 

Thanks in advance.

Edited by je82
Link to comment

CA Backup / Restore Appdata plugin provides a nice scheduled and configurable interface, no need to reinvent the wheel.

 

However, doing it your way with rsync will probably provide acceptable results, as long as the containers don't mind backups being taken while running. Many won't get a clean backup without stopping them first, so you would need to script a docker stop <container> rsync job docker start container sequence.

  • Thanks 1
Link to comment
2 minutes ago, jonathanm said:

CA Backup / Restore Appdata plugin provides a nice scheduled and configurable interface, no need to reinvent the wheel.

 

However, doing it your way with rsync will probably provide acceptable results, as long as the containers don't mind backups being taken while running. Many won't get a clean backup without stopping them first, so you would need to script a docker stop <container> rsync job docker start container sequence.

Cool, yeah thanks i'd want to include it in my regular backup script rather then using the plugin, just making sure it is an ok way to go, ill figure out the stopping of the containers before running the backup!

Link to comment
30 minutes ago, BRiT said:

I'd likely do a 2 step process to prevent having to deal with issues:

I second this. Squid does a good job maintaining the backup app to remain compatible and keep up with any dockerman issues, why not let him to the hard work and you just rsync the resulting archive to your backup of choice. That way you can take advantage of his restore functionality if needed, vs. figuring out what needs to be extracted from your archives.

 

Just point your script to backup the .tar.gz file his program creates and be happy.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...