mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-12-21 13:23:02 +01:00
add rest-server
This commit is contained in:
56
rest-server/README.md
Normal file
56
rest-server/README.md
Normal file
@@ -0,0 +1,56 @@
|
||||
rest-server
|
||||
===========
|
||||
|
||||
[Rest Server][1] is a high performance HTTP server that implements [restic][2]'s REST backend API.
|
||||
|
||||
## server
|
||||
|
||||
```bash
|
||||
$ docker-compose up -d
|
||||
|
||||
$ docker-compose exec rest-server create_user user
|
||||
New password: pass
|
||||
Re-type new password: pass
|
||||
Adding password for user user
|
||||
|
||||
$ tree -a data
|
||||
data
|
||||
└── .htpasswd
|
||||
```
|
||||
|
||||
## client
|
||||
|
||||
```bash
|
||||
$ export RESTIC_REPOSITORY=rest:http://user:pass@localhost:8000/test/
|
||||
$ export RESTIC_PASSWORD=******
|
||||
|
||||
$ restic init
|
||||
|
||||
$ restic backup /root/.bashrc
|
||||
|
||||
$ restic check
|
||||
|
||||
$ restic snapshots
|
||||
ID Time Host Tags Paths
|
||||
--------------------------------------------------------------------
|
||||
8f7d2fcf 2019-12-30 09:25:15 vultr /root/.bashrc
|
||||
--------------------------------------------------------------------
|
||||
|
||||
$ restic dump latest /root/.bashrc
|
||||
|
||||
$ mkdir -p /mnt/test
|
||||
$ restic mount /mnt/test
|
||||
$ tree -a /mnt/test/snapshots/
|
||||
├── 2019-12-30T09:25:15Z
|
||||
│ └── root
|
||||
│ └── .bashrc
|
||||
└── latest -> 2019-12-30T09:25:15Z
|
||||
|
||||
$ restic restore latest --target /tmp/test
|
||||
$ tree -a /tmp/test/
|
||||
└── root
|
||||
└── .bashrc
|
||||
```
|
||||
|
||||
[1]: https://github.com/restic/rest-server
|
||||
[2]: https://github.com/restic/restic
|
||||
9
rest-server/docker-compose.yml
Normal file
9
rest-server/docker-compose.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
rest-server:
|
||||
image: restic/rest-server
|
||||
ports:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
- ./data:/data
|
||||
environment:
|
||||
- DISABLE_AUTHENTICATION=true
|
||||
restart: unless-stopped
|
||||
Reference in New Issue
Block a user