[Systems] Docker backups

Bernie Innocenti bernie at sugarlabs.org
Fri Oct 24 20:42:04 EDT 2014


On 24/10/14 15:47, Sam P. wrote:
> Hi Bernie,
> 
> I don't think you need to back up /var/lib/docker/.  I will look more
> into this.
> 
> From memory, that just stores the docker images; all user data is stores
> in /srv/socialhelp.  All the images are either build from the code in
> /srv/socialhelp (~10min build time - less if cache survives) or
> downloaded from the docker hub.

I see that we have a pgsql db in there. Backing up the raw binary files
of the db is going to take a lot of space while not producing a
consistent backup. We should look for a way to dump of all databases
owned by containers daily, before the backup starts.


> As for why it is so big, I don't know.  I don't think docker is using
> aufs, instead it has fallen back to btrfs (for reasons unknown).  This
> is probably sucking more space.  There are also lots of unused images
> floating around, so I am removing them by:
> 
>     docker ps -a -q | xargs docker rm
>     docker images -q | xargs docker rmi
> 
> Both commands should return errors about not being able to delete
> running images (good thing).  They freed about 1GB of space :)

Nice. I have no production images yet. I only created an ubuntu image to
verify that docker was working after installing it (you can wipe it now).

Question: is it to be expectede that the processes in the containers are
also visible from the base system with ps? It's annoying, also because
the uids are different.

Question 2: how do we limit the resources of containers to make sure
they don't grow until freedom runs out of ram or disk space?


> I am happy to work on this tomorrow (or now).  I'm in Australia (google
> "time in Canberra"), so your afternoon is my morning and a good time to
> work on this.

Ok, see you tomorrow.

-- 
Bernie Innocenti
Sugar Labs Infrastructure Team
http://wiki.sugarlabs.org/go/Infrastructure_Team


More information about the Systems mailing list