Sign inSign up

feverch/rsync-ssh

By feverch

•Updated over 5 years ago

RSync SSH Docker

Image
0

388

feverch/rsync-ssh repository overview

⁠RSync SSH Docker

Docker image that provides SSH and rsync over SSH access to volumes. Authentication relies on SSH public keys that are provided as environment variables to the container.

This image aims to be used to create container endpoints in a backup infrastructure, which might act as an entry-point to retrieve the data to be saved, or in the other direction, to write down the backups.

It can be used as a target or a source for tools which use rsync to build incremental backups. Rsync time backup⁠ is a full-fledged backup script which includes features such that incremental backups, the purge of old backups with a customizable strategy.

⁠Usage

⁠Environment variable
  • SSH_PUB_KEYS: List of comma-separated SSH public keys.
⁠Volume mounts
  • /etc/ssh-rsync: path used to persist the host SSH (it is auto-generated if not present, i.e. on the first run).
  • /data: path used to actual folder that will be rsynced (as a source or a destination).
⁠Example

On the server side:

docker run -d \
    --name rsync-ssh-access \
    -v folder-to-be-rsynced:/data:ro \ 
    -v conf:/etc/ssh-rsync \ 
    -e SSH_PUB_KEYS="ssh-rsa AAAAB.../MsggyE= root@bkupdaemon" \
    -p 2222:22 feverch/rsync-ssh

On the client side:

rsync -avzH --numeric-ids -e 'ssh -p 2222' root@server:/data/ backup-directory/

2021 Raphaƫl P. Barazzutti - fever.ch

Tag summary

Content type

Image

Digest

Size

3.4 MB

Last updated

over 5 years ago

docker pull feverch/rsync-ssh