Public | Automated Build

Last pushed: a year ago
Short Description
Short description is empty for this repo.
Full Description

duplicity

Duplicity image, meant for backing up data from other containers.
It is presumed, the data you want to back ip is in a docker volume.

Basic usage

  • To backup data from a container, run duplicity container using --volumes-from.
  • The .cache/duplicity directory stores data duplicity uses to work.
  • The .ssh directory contains the known_hosts file which must contain the
    known_hosts information of the destination, if you are using sftp.
    Also it contains the rsa keys needed to authenticate such connection.
docker run \
    --volumes-from <name of the container you wish to backup> \
    -v root/.cache/duplicity:/root/.cache/duplicity \
    -v root/.ssh:root/.ssh \
    kendu/duplicity \
    bash -c "<your duplicity command>

For simple backups to secure locations such as local nas you can simply use the
--no-encryiption option.

The duplicity command will be something like this:

duplicity --full-if-older-than 1M --no-encryption /var/log sftp://username@someRemoteHost/logsBackup

Learn more about duplicity :
http://duplicity.nongnu.org/duplicity.1.html

Docker Pull Command
Owner
kendu
Source Repository

Comments (2)
lovrenca
2 years ago

@gigante: The reason why in the example the "root/.cache/duplicity" directory is mounted into the container is to make the container disposable. Of course, there is no reason why you couldn't backup from multiple data containers at the same time, provided their volumes do not overlap(e.g.: 2 containers don't have a volume with the same path). But what ever the casel I would advise to destroy the container after backup - run it with "--rm" flag. This will force you to think about how to implement your backups dynamic enough so you won't have trouble adding new backup locations(and containers) later on.

Tl.Dr. : Yes you can backup from multiple data containers at the same time.

gigante
2 years ago

Can I backup multiple data containers using one duplicity container, or do I need a duplicity container for each and every data container I want to backup?