- Get latest image with
docker-compose pull(unless you have build it manually) - Run
docker-compose up -d
- Get latest image with
docker pull time2backup/server(unless you have build it manually) - Run
docker run -d --env-file config.env --restart unless-stopped --name t2bserver -p 9922:22 -v /path/to/backups:/backups -v /path/to/config:/config:ro time2backup/t2bserver
- Create a file
config/ssh_keysand put your clients SSH public keys inside - (optionnal) You can also create authentication file
config/auth.confto secure time2backup server access with couplesuser:passwordlike this:
user1:password1
user2:password2
- Generate a SSH key:
ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_t2bserver - Edit your SSH config file
~/.ssh/configand add the following lines:
Host myt2bserver
Hostname <HOSTNAME|IPADRESS>
Port 9922
User t2b
IdentityFile ~/.ssh/id_t2bserver
- Edit your time2backup client config
time2backup.confand set destination:
destination = ssh://myt2bserver
- Copy your SSH public key and add it to the server config file
config/ssh_keys(see above) - (optionnal) If you have set passwords to the server (see above), set it in your time2backup client config:
t2bserver_pwd = "<USER>:<PASSWORD>"
You can change some advanced server configuration:
- To change backup/config paths, ssh port or restart behaviour, edit
docker-compose.ymlfile. You have to re-run the server to make your changes work (see below). - To set debug mode, sudo mode or other, edit
config/time2backup-server.conffile. You have to restart the server to make your changes work (see below).
- Using docker-compose:
docker-compose start|stop|restart - Using docker command:
docker start|stop|restart t2bserver
- Using docker-compose:
docker-compose down - Using docker command:
docker rm -f t2bserver
- Set the branch or version in Dockerfile
- Run
./build.sh
time2backup server is licensed under the MIT License. See LICENSE.md for the full license text.
Author: Jean Prunneaux https://jean.prunneaux.com
Source code: https://github.com/time2backup/docker-server