- 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_keys
and put your clients SSH public keys inside - (optionnal) You can also create authentication file
config/auth.conf
to secure time2backup server access with couplesuser:password
like 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/config
and add the following lines:
Host myt2bserver
Hostname <HOSTNAME|IPADRESS>
Port 9922
User t2b
IdentityFile ~/.ssh/id_t2bserver
- Edit your time2backup client config
time2backup.conf
and 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.yml
file. 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.conf
file. 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