You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
autorestic/docs/markdown/quick.md

87 lines
2.0 KiB

5 years ago
# 🚀 Quickstart
## Installation
```bash
wget -qO - https://raw.githubusercontent.com/cupcakearmy/autorestic/master/install.sh | bash
5 years ago
```
4 years ago
See [installation](/installation) for alternative options.
5 years ago
## Write a simple config file
```bash
vim ~/.autorestic.yml
5 years ago
```
For a quick overview:
- `locations` can be seen as the inputs and `backends` the output where the data is stored and backed up.
4 years ago
- One `location` can have one or multiple `backends` for redundancy.
4 years ago
- One `backend` can also be the target for multiple `locations`.
4 years ago
> **⚠️ WARNING ⚠️**
>
> Note that the data is automatically encrypted on the server. The key will be generated and added to your config file. Every backend will have a separate key. **You should keep a copy of the keys or config file somewhere in case your server dies**. Otherwise DATA IS LOST!
5 years ago
```yaml | .autorestic.yml
3 years ago
version: 2
5 years ago
locations:
home:
3 years ago
from: /home
# Or multiple
# from:
# - /foo
# - /bar
5 years ago
to: remote
important:
5 years ago
from: /path/to/important/stuff
to:
- remote
- hdd
backends:
4 years ago
remote:
5 years ago
type: s3
path: 's3.amazonaws.com/bucket_name'
4 years ago
key: some-random-password-198rc79r8y1029c8yfewj8f1u0ef87yh198uoieufy
env:
AWS_ACCESS_KEY_ID: account_id
AWS_SECRET_ACCESS_KEY: account_key
5 years ago
4 years ago
hdd:
5 years ago
type: local
path: /mnt/my_external_storage
4 years ago
key: 'if not key is set it will be generated for you'
5 years ago
```
4 years ago
## Check
5 years ago
```bash
4 years ago
autorestic check
5 years ago
```
This checks if the config file has any issues. If this is the first time this can take longer as autorestic will setup the backends.
4 years ago
Now is good time to **backup the config**. After you run autorestic at least once we will add the generated encryption keys to the config.
5 years ago
## Backup
```bash
autorestic backup -a
```
This will do a backup of all locations.
## Restore
```bash
autorestic restore -l home --from hdd --to /path/where/to/restore
```
This will restore the location `home` from the backend `hdd` to the given path.
> :ToCPrevNext