https://github.com/edouard-lopez/backup-docker-to-ftp
Easily backup your docker container data to a FTP server.
https://github.com/edouard-lopez/backup-docker-to-ftp
backup bats docker ftp shell-script
Last synced: 6 months ago
JSON representation
Easily backup your docker container data to a FTP server.
- Host: GitHub
- URL: https://github.com/edouard-lopez/backup-docker-to-ftp
- Owner: edouard-lopez
- License: mit
- Created: 2017-03-29T01:25:58.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-21T10:44:51.000Z (over 8 years ago)
- Last Synced: 2025-02-09T11:43:50.040Z (8 months ago)
- Topics: backup, bats, docker, ftp, shell-script
- Language: Shell
- Homepage:
- Size: 18.6 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/edouard-lopez/backup-docker-to-ftp)
> Easily backup your docker container to a FTP server.
### Usage
**Configure your `credentials.conf`**:
```bash
# 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**:bulb: 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:** `docker` ≥ `17.03`, `curl`.
$ git clone https://github.com/edouard-lopez/backup-docker-to-ftp.git
### Test
**Requirements:** [`bats`](https://github.com/sstephenson/bats).
$ bats ./test_backup.bats
:warning:**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](https://asciinema.org/a/ahai3uli13w9l52ywbjc8k0d9)):