GithubHelp home page GithubHelp logo

edouard-lopez / backup-docker-to-ftp Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 19 KB

Easily backup your docker container data to a FTP server.

License: MIT License

Shell 100.00%
backup docker ftp bats shell-script

backup-docker-to-ftp's Introduction

Build Status

Easily backup your docker container to a FTP server.

Usage

Configure your credentials.conf:

# credentials.conf
export FTP_USER="my-user"
export FTP_PASSWORD="my-password"
export FTP_HOST="backup.server.org"

Edit dockers-to-backup.txt

Add the containers' name or id you want to backup.

my_project_nginx_1
my_project_frontend_1
1e52f28bb583

💡 protip: prefer the name as it will make the archive's filename more explicit).

Launch

$ ./backup-list.bash

For more control check out

$ ./backup.bash --help

Install

Requirements: docker17.03, curl.

$ git clone https://github.com/edouard-lopez/backup-docker-to-ftp.git

Test

Requirements: bats.

$ bats ./test_backup.bats

⚠️Note: busybox and panubo/vsftpd images will be –silently– pulled if missing (takes a few minutes).

Test FTP

You can test by configuring your credentials in .netrc and overriding $HOME to point to it (see video):

backup-docker-to-ftp's People

Contributors

edouard-lopez avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

akema-fr

backup-docker-to-ftp's Issues

CI test fail

 ✗ --send: send archive to FTP
   (in test file test_backup.bats, line 130)
     `[[ $status == 0 ]]' failed
   9500cae535a60b7ab70717a9748c9f1a238c47bafc8ffe0ef5355fdfae63f134
   59497d741524f74ed843707b9ba70d06c053e7fc269573024eb8d4aaaa60db60
   tar: Removing leading `/' from member names
   /tmp/mock_seafile.data-2017-06-21.tar.gz

add --copy

Add a --copy flag so we can copy archive to mounted locally instead of --send to remote server.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.