mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2025-09-06 10:30:39 +00:00
Compare commits
87 Commits
Author | SHA1 | Date | |
---|---|---|---|
7fb0fbd467 | |||
cbc1b33750 | |||
e7be01da37 | |||
|
309073fe4d | ||
|
1243721a7e | ||
ebb934d1c5 | |||
8417a6e0aa | |||
2b5efd0499 | |||
af6e715b27 | |||
9484299cd9 | |||
ef93fef36a | |||
995f2250a1 | |||
3498e6da7b | |||
7128983581 | |||
158407927a | |||
ea8bf83799 | |||
e8a8ccccd0 | |||
b332897713 | |||
369037ea77 | |||
|
52cd6fe3fd | ||
|
b6f7ef6577 | ||
1a891fffbd | |||
ed68160a9a | |||
20ecd21928 | |||
df6fd75ca4 | |||
c918fb6ded | |||
2bc8fe4ee7 | |||
757a134362 | |||
6bb36cbde0 | |||
5c0b67b7fb | |||
1520e10a59 | |||
f9c645120b | |||
8fd0240929 | |||
da7b70c7a7 | |||
c138ac9882 | |||
af04f1cded | |||
3a43b2b113 | |||
885c7ca778 | |||
44a48aab9b | |||
f5f550f5b1 | |||
f1d5a6b5dd | |||
734c962006 | |||
d20a2fda68 | |||
8dcd0b1f12 | |||
9acb6296e4 | |||
82f6942ff1 | |||
22f5f61ee0 | |||
ddce8bf8a7 | |||
abeaacf182 | |||
db436587ee | |||
32837e7e45 | |||
500abfbd27 | |||
4ee54110a6 | |||
92e5071343 | |||
7e577c439a | |||
bc36a39de4 | |||
9e6b393e62 | |||
de34396b93 | |||
ebbe10608a | |||
8a34270934 | |||
e459e393a9 | |||
b1a3074f33 | |||
ae63d8b12e | |||
7aa937dd41 | |||
|
37361727ba | ||
f1874438e5 | |||
|
066342a7b7 | ||
|
f620bb1764 | ||
|
e3506e44b5 | ||
|
f65a83991b | ||
f10b8c7990 | |||
|
a8af085d9c | ||
fa89d2941f | |||
|
bcabd467c9 | ||
|
005072b90f | ||
|
d13d4f7cf1 | ||
330e3254f7 | |||
38763ed919 | |||
|
886b6362cd | ||
|
9ece1d867d | ||
|
485ada6599 | ||
|
e80db74af4 | ||
|
2fd9e2dd22 | ||
0c654eacf1 | |||
|
8fdf5188ff | ||
|
22d93f0b9c | ||
|
f940f23338 |
31
.drone.yml
Normal file
31
.drone.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: node
|
||||
pull: always
|
||||
commands:
|
||||
- yarn
|
||||
- yarn run bin
|
||||
when:
|
||||
event: tag
|
||||
|
||||
- name: publish
|
||||
image: plugins/github-release
|
||||
pull: always
|
||||
settings:
|
||||
api_key:
|
||||
from_secret: github
|
||||
files: bin/*
|
||||
checksum:
|
||||
- sha512
|
||||
note: CHANGELOG.md
|
||||
when:
|
||||
event: tag
|
||||
---
|
||||
kind: signature
|
||||
hmac: 3b1f235f6a6f0ee1aa3f572d0833c4f0eec931dbe0378f31b9efa336a7462912
|
||||
|
||||
...
|
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
github: cupcakearmy
|
18
.gitignore
vendored
18
.gitignore
vendored
@@ -1,10 +1,22 @@
|
||||
node_modules/
|
||||
package-lock.json
|
||||
# Editors
|
||||
.idea
|
||||
yarn.lock
|
||||
.vscode
|
||||
|
||||
# Node
|
||||
node_modules/
|
||||
|
||||
# Build & Runtime
|
||||
bin
|
||||
lib
|
||||
data
|
||||
restore
|
||||
docker
|
||||
Dockerfile
|
||||
|
||||
# Config
|
||||
.autorestic.yml
|
||||
.autorestic.lock
|
||||
.docker.yml
|
||||
|
||||
# Docs
|
||||
.codedoc
|
@@ -1,3 +0,0 @@
|
||||
semi: false
|
||||
singleQuote: true
|
||||
trailingComma: 'es5'
|
4
.prettierrc.yml
Normal file
4
.prettierrc.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
semi: false
|
||||
singleQuote: true
|
||||
trailingComma: 'es5'
|
||||
printWidth: 150
|
3
CHANGELOG.md
Normal file
3
CHANGELOG.md
Normal file
@@ -0,0 +1,3 @@
|
||||
## 0.20
|
||||
|
||||
- enable rest endpoint
|
352
README.md
352
README.md
@@ -1,331 +1,21 @@
|
||||
# autorestic
|
||||
High backup level CLI utility for [restic](https://restic.net/).
|
||||
|
||||
Autorestic is a wrapper around the amazing [restic](https://restic.net/). While being amazing the restic cli can be a bit overwhelming and difficoult to manage if you have many different location that you want to backup to multiple locations. This utility is aimed at making this easier 🙂
|
||||
|
||||

|
||||
|
||||
## 🌈 Features
|
||||
|
||||
- Config files, no CLI
|
||||
- Predictable
|
||||
- Backup locations to multiple backends
|
||||
- Snapshot policies and pruning
|
||||
- Simple interface
|
||||
- Fully encrypted
|
||||
|
||||
### 📒 Docs
|
||||
|
||||
* [Locations](#-locations)
|
||||
* [Pruning & Deleting old files](#pruning-and-snapshot-policies)
|
||||
* [Excluding files](#excluding-filesfolders)
|
||||
* [Hooks](#before--after-hooks)
|
||||
* [Backends](#-backends)
|
||||
* [Commands](#-commands)
|
||||
|
||||
## 🛳 Installation
|
||||
|
||||
Linux & macOS. Windows is not supported.
|
||||
|
||||
```
|
||||
curl -s https://raw.githubusercontent.com/CupCakeArmy/autorestic/master/install.sh | bash
|
||||
```
|
||||
|
||||
## 🚀 Quickstart
|
||||
|
||||
### Setup
|
||||
|
||||
First we need to configure our locations and backends. Simply create a `.autorestic.yml` either in your home directory of in the folder from which you will execute `autorestic`.
|
||||
|
||||
Optionally you can specify the location of your config file by passing it as argument: `autorestic -c ../path/config.yml`
|
||||
|
||||
```yaml
|
||||
locations:
|
||||
home:
|
||||
from: /home/me
|
||||
to: remote
|
||||
|
||||
important:
|
||||
from: /path/to/important/stuff
|
||||
to:
|
||||
- remote
|
||||
- hdd
|
||||
|
||||
backends:
|
||||
remote:
|
||||
type: b2
|
||||
path: 'myBucket:backup/home'
|
||||
B2_ACCOUNT_ID: account_id
|
||||
B2_ACCOUNT_KEY: account_key
|
||||
|
||||
hdd:
|
||||
type: local
|
||||
path: /mnt/my_external_storage
|
||||
```
|
||||
|
||||
Then we check if everything is correct by running the `check` command. We will pass the `-a` (or `--all`) to tell autorestic to check all the locations.
|
||||
|
||||
If we would check only one location we could run the following: `autorestic check -l home`. Otherwise simpply check all locations with `autorestic check -a`
|
||||
|
||||
##### Note
|
||||
|
||||
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 somewhere in case your server dies. Otherwise DATA IS LOST!
|
||||
|
||||
### 📦 Backup
|
||||
|
||||
```
|
||||
autorestic backup -a
|
||||
```
|
||||
|
||||
### 📼 Restore
|
||||
|
||||
```
|
||||
autorestic restore -l home --from hdd --to /path/where/to/restore
|
||||
```
|
||||
|
||||
### 📲 Updates
|
||||
|
||||
Autorestic can update itself! Super handy right? Simply run `autorestic update` and we will check for you if there are updates for restic and autorestic and install them if necessary.
|
||||
|
||||
## 🗂 Locations
|
||||
|
||||
A location simply a folder on your machine that restic will backup. The paths can be relative from the config file. A location can have multiple backends, so that the data is secured across multiple servers.
|
||||
|
||||
```yaml
|
||||
locations:
|
||||
my-location-name:
|
||||
from: path/to/backup
|
||||
to:
|
||||
- name-of-backend
|
||||
- also-backup-to-this-backend
|
||||
```
|
||||
|
||||
#### Pruning and snapshot policies
|
||||
|
||||
Autorestic supports declaring snapshot policies for location to avoid keeping old snapshot around if you don't need them.
|
||||
|
||||
This is based on [Restic's snapshots policies](https://restic.readthedocs.io/en/latest/060_forget.html#removing-snapshots-according-to-a-policy), and can be enabled for each location as shown below:
|
||||
|
||||
```yaml
|
||||
locations:
|
||||
etc:
|
||||
from: /etc
|
||||
to: local
|
||||
options:
|
||||
forget:
|
||||
keep-last: 5 # always keep at least 5 snapshots
|
||||
keep-hourly: 3 # keep 3 last hourly shapshots
|
||||
keep-daily: 4 # keep 4 last daily shapshots
|
||||
keep-weekly: 1 # keep 1 last weekly shapshots
|
||||
keep-monthly: 12 # keep 12 last monthly shapshots
|
||||
keep-yearly: 7 # keep 7 last yearly shapshots
|
||||
keep-within: "2w" # keep snapshots from the last 2 weeks
|
||||
```
|
||||
|
||||
Pruning can be triggered using `autorestic forget -a`, for all locations, or selectively with `autorestic forget -l <location>`. **please note that contrary to the restic CLI, `restic forget` will call `restic prune` internally.**
|
||||
|
||||
Run with the `--dry-run` flag to only print information about the process without actually pruning the snapshots. This is especially useful for debugging or testing policies:
|
||||
```
|
||||
$ autorestic forget -a --dry-run --verbose
|
||||
|
||||
Configuring Backends
|
||||
local : Done ✓
|
||||
|
||||
Removing old shapshots according to policy
|
||||
etc ▶ local : Removing old spnapshots… ⏳
|
||||
etc ▶ local : Running in dry-run mode, not touching data
|
||||
etc ▶ local : Forgeting old snapshots… ⏳Applying Policy: all snapshots within 2d of the newest
|
||||
keep 3 snapshots:
|
||||
ID Time Host Tags Reasons Paths
|
||||
-----------------------------------------------------------------------------
|
||||
531b692a 2019-12-02 12:07:28 computer within 2w /etc
|
||||
51659674 2019-12-02 12:08:46 computer within 2w /etc
|
||||
f8f8f976 2019-12-02 12:11:08 computer within 2w /etc
|
||||
-----------------------------------------------------------------------------
|
||||
3 snapshots
|
||||
```
|
||||
|
||||
#### Excluding files/folders
|
||||
|
||||
If you want to exclude certain files or folders it done easily by specifiyng the right flags in the location you desire to filter. The flags are taken straight from the [restic cli exclude rules](https://restic.readthedocs.io/en/latest/040_backup.html#excluding-files).
|
||||
|
||||
```yaml
|
||||
locations:
|
||||
my-location:
|
||||
from: /data
|
||||
to:
|
||||
- local
|
||||
- remote
|
||||
options:
|
||||
backup:
|
||||
exclude:
|
||||
- '*.nope'
|
||||
- '*.abc'
|
||||
exclude-file: .gitignore
|
||||
|
||||
backends:
|
||||
local:
|
||||
...
|
||||
remote:
|
||||
...
|
||||
```
|
||||
|
||||
#### Before / After hooks
|
||||
|
||||
Sometimes you might want to stop an app/db before backing up data and start the service again after the backup has completed. This is what the hooks are made for. Simply add them to your location config. You can have as many commands as you wish.
|
||||
|
||||
```yaml
|
||||
locations:
|
||||
my-location:
|
||||
from: /data
|
||||
to:
|
||||
- local
|
||||
- remote
|
||||
hooks:
|
||||
before:
|
||||
- echo "Hello"
|
||||
- echo "Human"
|
||||
after:
|
||||
- echo "kthxbye"
|
||||
```
|
||||
|
||||
## 💽 Backends
|
||||
|
||||
Backends are the place where you data will be saved. Backups are incremental and encrypted.
|
||||
|
||||
### Fields
|
||||
|
||||
##### `type`
|
||||
|
||||
Type of the backend see a list [here](https://restic.readthedocs.io/en/stable/030_preparing_a_new_repo.html)
|
||||
|
||||
Supported are:
|
||||
- [Local](https://restic.readthedocs.io/en/stable/030_preparing_a_new_repo.html#local)
|
||||
- [Backblaze B2](https://restic.readthedocs.io/en/stable/030_preparing_a_new_repo.html#backblaze-b2)
|
||||
- [Amazon S3](https://restic.readthedocs.io/en/stable/030_preparing_a_new_repo.html#amazon-s3)
|
||||
- [Minio](https://restic.readthedocs.io/en/stable/030_preparing_a_new_repo.html#minio-server)
|
||||
- [Google Cloud Storage](https://restic.readthedocs.io/en/stable/030_preparing_a_new_repo.html#google-cloud-storage)
|
||||
- [Microsoft Azure Storage](https://restic.readthedocs.io/en/stable/030_preparing_a_new_repo.html#microsoft-azure-blob-storage)
|
||||
|
||||
For each backend you need to specify the right variables as shown in the example below.
|
||||
|
||||
##### `path`
|
||||
|
||||
The path on the remote server.
|
||||
For object storages as
|
||||
|
||||
##### Example
|
||||
|
||||
```yaml
|
||||
backends:
|
||||
name-of-backend:
|
||||
type: b2
|
||||
path: 'myAccount:myBucket/my/path'
|
||||
B2_ACCOUNT_ID: backblaze_account_id
|
||||
B2_ACCOUNT_KEY: backblaze_account_key
|
||||
```
|
||||
|
||||
## 👉 Commands
|
||||
|
||||
* [info](#info)
|
||||
* [check](#check)
|
||||
* [backup](#backup)
|
||||
* [forget](#forget)
|
||||
* [restore](#restore)
|
||||
* [exec](#exec)
|
||||
* [intall](#install)
|
||||
* [uninstall](#uninstall)
|
||||
* [upgrade](#upgrade)
|
||||
|
||||
|
||||
### Info
|
||||
|
||||
```
|
||||
autorestic info
|
||||
```
|
||||
|
||||
Shows all the information in the config file. Usefull for a quick overview of what location backups where.
|
||||
|
||||
Pro tip: if it gets a bit long you can read it more easily with `autorestic info | less` 😉
|
||||
|
||||
### Check
|
||||
|
||||
```
|
||||
autorestic check [-b, --backend] [-a, --all]
|
||||
```
|
||||
|
||||
Checks the backends and configures them if needed. Can be applied to all with the `-a` flag or by specifying one or more backends with the `-b` or `--backend` flag.
|
||||
|
||||
|
||||
### Backup
|
||||
|
||||
```
|
||||
autorestic backup [-l, --location] [-a, --all]
|
||||
```
|
||||
|
||||
Performes a backup of all locations if the `-a` flag is passed. To only backup some locations pass one or more `-l` or `--location` flags.
|
||||
|
||||
|
||||
### Restore
|
||||
|
||||
```
|
||||
autorestic restore [-l, --location] [--from backend] [--to <out dir>]
|
||||
```
|
||||
|
||||
This will restore all the locations to the selected target. If for one location there are more than one backends specified autorestic will take the first one.
|
||||
|
||||
Lets see a more realistic example (from the config above)
|
||||
```
|
||||
autorestic restore -l home --from hdd --to /path/where/to/restore
|
||||
```
|
||||
|
||||
This will restore the location `home` to the `/path/where/to/restore` folder and taking the data from the backend `hdd`
|
||||
|
||||
```
|
||||
autorestic restore
|
||||
```
|
||||
|
||||
Performes a backup of all locations if the `-a` flag is passed. To only backup some locations pass one or more `-l` or `--location` flags.
|
||||
|
||||
### Forget
|
||||
|
||||
|
||||
```
|
||||
autorestic forget [-l, --location] [-a, --all] [--dry-run]
|
||||
```
|
||||
|
||||
This will prune and remove old data form the backends according to the [keep policy you have specified for the location](#pruning-and-snapshot-policies)
|
||||
|
||||
The `--dry-run` flag will do a dry run showing what would have been deleted, but won't touch the actual data.
|
||||
|
||||
|
||||
### Exec
|
||||
|
||||
```
|
||||
autorestic exec [-b, --backend] [-a, --all] <command> -- [native options]
|
||||
```
|
||||
|
||||
This is avery handy command which enables you to run any native restic command on desired backends. An example would be listing all the snapshots of all your backends:
|
||||
|
||||
```
|
||||
autorestic exec -a -- snapshots
|
||||
```
|
||||
|
||||
#### Install
|
||||
|
||||
Installs both restic and autorestic
|
||||
|
||||
#### Uninstall
|
||||
|
||||
Uninstall both restic and autorestic
|
||||
|
||||
#### Upgrade
|
||||
|
||||
Upgrades both restic and autorestic automagically
|
||||
|
||||
## Contributors
|
||||
|
||||
This amazing people helped the project!
|
||||
|
||||
- @ChanceM [Docs]
|
||||
- @EliotBerriot [Docs, Pruning, S3]
|
||||
<p align="center">
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<img align="center" src="https://github.com/cupcakearmy/autorestic/raw/master/docs/assets/logo.png" height="50" alt="autorestic logo">
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<p align="center">
|
||||
Config driven, easy backup cli for <a href="https://restic.net/">restic</a>.
|
||||
<br>
|
||||
<strong><a href="https://cupcakearmy.github.io/autorestic/">»»» Docs & Getting Started »»»</a></strong>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
### Why / What?
|
||||
|
||||
Autorestic is a wrapper around the amazing [restic](https://restic.net/). While being amazing the restic cli can be a bit overwhelming and difficult to manage if you have many different location that you want to backup to multiple locations. This utility is aimed at making this easier 🙂
|
||||
|
9
RELEASE.md
Normal file
9
RELEASE.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Releasing
|
||||
|
||||
Releases are handled by the CD server with includes checksums for each binary.
|
||||
|
||||
```bash
|
||||
git tag 0.x
|
||||
git push
|
||||
git push origin --tags
|
||||
```
|
BIN
docs/Sketch.png
BIN
docs/Sketch.png
Binary file not shown.
Before Width: | Height: | Size: 1.9 MiB |
BIN
docs/assets/logo.png
Normal file
BIN
docs/assets/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
62
docs/backend/available.html
Normal file
62
docs/backend/available.html
Normal file
File diff suppressed because one or more lines are too long
62
docs/backend/overview.html
Normal file
62
docs/backend/overview.html
Normal file
File diff suppressed because one or more lines are too long
62
docs/cli/backup.html
Normal file
62
docs/cli/backup.html
Normal file
File diff suppressed because one or more lines are too long
62
docs/cli/check.html
Normal file
62
docs/cli/check.html
Normal file
File diff suppressed because one or more lines are too long
62
docs/cli/cron.html
Normal file
62
docs/cli/cron.html
Normal file
@@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html><html><head><title>Autorestic | Cron</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"><meta name="robots" content="index,follow"><meta name="theme-color" content="#212121"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"><link href="https://fonts.googleapis.com/css?family=Hind:400,700&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:300,400&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined" rel="stylesheet"><style>
|
||||
body, input, button {
|
||||
font-family: 'Hind', sans-serif;
|
||||
}
|
||||
|
||||
code, .hljs {
|
||||
font-family: 'Source Code Pro', 'Courier New', Courier, monospace;
|
||||
}
|
||||
|
||||
.icon-font {
|
||||
font-family: 'Material Icons';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px; /* Preferred icon size */
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: nowrap;
|
||||
direction: ltr;
|
||||
|
||||
/* Support for all WebKit browsers. */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
/* Support for Safari and Chrome. */
|
||||
text-rendering: optimizeLegibility;
|
||||
|
||||
/* Support for Firefox. */
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Support for IE. */
|
||||
font-feature-settings: 'liga';
|
||||
}
|
||||
|
||||
.icon-font.outline {
|
||||
font-family: 'Material Icons Outlined';
|
||||
}
|
||||
</style><link href="/autorestic/./dist/codedoc-styles.css" rel="stylesheet"><script async="" defer="" src="/autorestic/./dist/codedoc-bundle.js"></script></head><body><div class="header-0-0-9"><script async="" defer="" src="https://buttons.github.io/buttons.js"></script><a class="github-button" data-color-scheme="no-preference: light; light: light; dark: dark;" data-icon="false" data-show-count="true" data-size="false" href="https://github.com/cupcakearmy/autorestic/">Star</a><br><br><a class="watermark-0-0-8" href="https://github.com/CONNECT-platform/codedoc" target="_blank">Created With<svg viewBox="0 0 536 296" version="1.1" xmlns="http://www.w3.org/2000/svg"><g id="codedoc" transform="translate(-244.000000, -364.000000)" fill-rule="nonzero"><path d="M580,532 C615.346224,532 644,560.653776 644,596 C644,631.346224 615.346224,660 580,660 C544.653776,660 516,631.346224 516,596 C516,560.653776 544.653776,532 580,532 Z M716,532 C751.346224,532 780,560.653776 780,596 C780,631.346224 751.346224,660 716,660 L692,660 C687.581722,660 684,656.418278 684,652 C684,647.581722 687.581722,644 692,644 L716,644 C742.509668,644 764,622.509668 764,596 C764,569.490332 742.509668,548 716,548 L692,548 C687.581722,548 684,544.418278 684,540 C684,535.581722 687.581722,532 692,532 L716,532 Z M468,532 C472.418278,532 476,535.581722 476,540 L476,652 C476,656.418278 472.418278,660 468,660 L444,660 C408.653776,660 380,631.346224 380,596 C380,560.653776 408.653776,532 444,532 L468,532 Z M332,532 C336.418278,532 340,535.581722 340,540 L340,652 C340,656.418278 336.418278,660 332,660 L252,660 C247.581722,660 244,656.418278 244,652 L244,540 C244,535.581722 247.581722,532 252,532 L332,532 Z M580,548 C553.490332,548 532,569.490332 532,596 C532,622.509668 553.490332,644 580,644 C606.509668,644 628,622.509668 628,596 C628,569.490332 606.509668,548 580,548 Z M461,548 L444,548 C417.490332,548 396,569.490332 396,596 C396,622.509668 417.490332,644 444,644 L461,644 L461,548 Z M444,364 C479.346224,364 508,392.653776 508,428 C508,463.346224 479.346224,492 444,492 C408.653776,492 380,463.346224 380,428 C380,392.653776 408.653776,364 444,364 Z M332,364 C336.418278,364 340,367.581722 340,372 C340,376.418278 336.418278,380 332,380 L308,380 C281.490332,380 260,401.490332 260,428 C260,454.509668 281.490332,476 308,476 L332,476 C336.418278,476 340,479.581722 340,484 C340,488.418278 336.418278,492 332,492 L308,492 C272.653776,492 244,463.346224 244,428 C244,392.653776 272.653776,364 308,364 L332,364 Z M580,364 C615.346224,364 644,392.653776 644,428 C644,463.346224 615.346224,492 580,492 L556,492 C551.581722,492 548,488.418278 548,484 L548,372 C548,367.581722 551.581722,364 556,364 L580,364 Z M772,364 C776.418278,364 780,367.581722 780,372 C780,376.418278 776.418278,380 772,380 L700,380 L700,420 L772,420 C776.418278,420 780,423.581722 780,428 C780,432.418278 776.418278,436 772,436 L700,436 L700,476 L772,476 C776.418278,476 780,479.581722 780,484 C780,488.418278 776.418278,492 772,492 L692,492 C687.581722,492 684,488.418278 684,484 L684,372 C684,367.581722 687.581722,364 692,364 L772,364 Z M444,380 C417.490332,380 396,401.490332 396,428 C396,454.509668 417.490332,476 444,476 C470.509668,476 492,454.509668 492,428 C492,401.490332 470.509668,380 444,380 Z M580,380 L563,380 L563,476 L580,476 C606.509668,476 628,454.509668 628,428 C628,401.490332 606.509668,380 580,380 Z"></path></g></svg></a></div><div id="-codedoc-container" class="container"><h1 id="cron" class="heading-0-0-1"><span class="anchor-0-0-2" data-ignore-text=""><span class="icon-font" data-ignore-text="" style="vertical-align: sub">link</span></span>Cron</h1><pre class=""><code class="bash code-0-0-3" tabindex="0"><span class="wmbar-0-0-6"><span></span><span></span><span></span><span></span></span><div class="line-0-0-5 " data-content="autorestic cron"><span class="lineCounter-0-0-4 prim">1</span>autorestic <span class="token function">cron</span></div><br></code></pre><p>This command is modtly intended to be triggered by an automated system like systemd or crontab.</p><p>It will run cron jobs es <a href="/autorestic/locations/cron">specified in the cron section</a> of a specific location.</p><script id="XVLO_iWBYS">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("XVLO_iWBYS", "qcaKEY878Mn2dFQW/lSrDg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="contentnav-0-0-14" data-no-search=""><a href="#cron" class="h1" data-content-highlight="cron">Cron</a></div></div><div id="-codedoc-toc" class="toc-0-0-11"><script>
|
||||
if (window.matchMedia('(min-width: 1200px)').matches) {
|
||||
if (!localStorage.getItem('-codedoc-toc-active')) {
|
||||
localStorage.setItem('-codedoc-toc-active', "true");
|
||||
}
|
||||
}
|
||||
</script><div class="content-0-0-12"><p><a href="/autorestic/">Home</a>
|
||||
<a href="/autorestic/quick">Quick Start</a>
|
||||
<a href="/autorestic/installation">Installation</a>
|
||||
<a href="/autorestic/config">Configuration</a></p><div class="collapse-0-0-7 "><script id="jXojLPZOFe">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("jXojLPZOFe", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">Locations</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/location/overview">Overview</a>
|
||||
<a href="/autorestic/location/hooks">Hooks</a>
|
||||
<a href="/autorestic/location/exclude">Excluding Files</a>
|
||||
<a href="/autorestic/location/forget">Forget Policy</a>
|
||||
<a href="/autorestic/location/cron">Cron</a>
|
||||
<a href="/autorestic/location/docker">Docker Volumes</a></p></div></div><div class="collapse-0-0-7 "><script id="szEgSUVHvi">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("szEgSUVHvi", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">Backend</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/backend/overview">Overview</a>
|
||||
<a href="/autorestic/backend/available">Available Backends</a></p></div></div><div class="collapse-0-0-7 "><script id="iVHhcuHiZA">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("iVHhcuHiZA", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">CLI</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/cli/info">Info</a>
|
||||
<a href="/autorestic/cli/check">Check</a>
|
||||
<a href="/autorestic/cli/backup">Backup</a>
|
||||
<a href="/autorestic/cli/restore">Restore</a>
|
||||
<a href="/autorestic/cli/forget">Forget</a>
|
||||
<a href="/autorestic/cli/cron">Cron</a>
|
||||
<a href="/autorestic/cli/exec">Exec</a>
|
||||
<a href="/autorestic/cli/install">Install</a>
|
||||
<a href="/autorestic/cli/uninstall">Uninstall</a>
|
||||
<a href="/autorestic/cli/update">Update</a></p></div></div><p><a href="/autorestic/examples">Examples</a></p><p><a href="/autorestic/qa">QA</a></p><p><a href="/autorestic/contrib">Contributors</a></p></div><div class="search-0-0-13"><script id="PQNBxMpMeq">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("PQNBxMpMeq", "+SrlfVhZ/PRQ5WhUlZbTaA==", {"repo":"autorestic","user":"cupcakearmy","root":"docs/md","pick":"\\.md$","drop":"(^_)|(\\/_)"});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div></div><div class="footer-0-0-10"><div class="left"><script id="orBnZpTcdS">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("orBnZpTcdS", "XsNW3ht5ee+RmVUActEo9g==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div><div class="main"><div class="inside"><a href="https://github.com/cupcakearmy/autorestic/" target="_blank">GitHub</a></div></div><div class="right"><script id="CVzwgvKwWM">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("CVzwgvKwWM", "Y1WWvCKxkgk1yh8xbCfXqw==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div></div><script id="BJJEfWfPdz">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("BJJEfWfPdz", "v641FmLj+AeGp0uuFTI6ug==", {"namespace":"/autorestic"});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></body></html>
|
62
docs/cli/exec.html
Normal file
62
docs/cli/exec.html
Normal file
File diff suppressed because one or more lines are too long
62
docs/cli/forget.html
Normal file
62
docs/cli/forget.html
Normal file
@@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html><html><head><title>Autorestic | Forget</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"><meta name="robots" content="index,follow"><meta name="theme-color" content="#212121"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"><link href="https://fonts.googleapis.com/css?family=Hind:400,700&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:300,400&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined" rel="stylesheet"><style>
|
||||
body, input, button {
|
||||
font-family: 'Hind', sans-serif;
|
||||
}
|
||||
|
||||
code, .hljs {
|
||||
font-family: 'Source Code Pro', 'Courier New', Courier, monospace;
|
||||
}
|
||||
|
||||
.icon-font {
|
||||
font-family: 'Material Icons';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px; /* Preferred icon size */
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: nowrap;
|
||||
direction: ltr;
|
||||
|
||||
/* Support for all WebKit browsers. */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
/* Support for Safari and Chrome. */
|
||||
text-rendering: optimizeLegibility;
|
||||
|
||||
/* Support for Firefox. */
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Support for IE. */
|
||||
font-feature-settings: 'liga';
|
||||
}
|
||||
|
||||
.icon-font.outline {
|
||||
font-family: 'Material Icons Outlined';
|
||||
}
|
||||
</style><link href="/autorestic/./dist/codedoc-styles.css" rel="stylesheet"><script async="" defer="" src="/autorestic/./dist/codedoc-bundle.js"></script></head><body><div class="header-0-0-9"><script async="" defer="" src="https://buttons.github.io/buttons.js"></script><a class="github-button" data-color-scheme="no-preference: light; light: light; dark: dark;" data-icon="false" data-show-count="true" data-size="false" href="https://github.com/cupcakearmy/autorestic/">Star</a><br><br><a class="watermark-0-0-8" href="https://github.com/CONNECT-platform/codedoc" target="_blank">Created With<svg viewBox="0 0 536 296" version="1.1" xmlns="http://www.w3.org/2000/svg"><g id="codedoc" transform="translate(-244.000000, -364.000000)" fill-rule="nonzero"><path d="M580,532 C615.346224,532 644,560.653776 644,596 C644,631.346224 615.346224,660 580,660 C544.653776,660 516,631.346224 516,596 C516,560.653776 544.653776,532 580,532 Z M716,532 C751.346224,532 780,560.653776 780,596 C780,631.346224 751.346224,660 716,660 L692,660 C687.581722,660 684,656.418278 684,652 C684,647.581722 687.581722,644 692,644 L716,644 C742.509668,644 764,622.509668 764,596 C764,569.490332 742.509668,548 716,548 L692,548 C687.581722,548 684,544.418278 684,540 C684,535.581722 687.581722,532 692,532 L716,532 Z M468,532 C472.418278,532 476,535.581722 476,540 L476,652 C476,656.418278 472.418278,660 468,660 L444,660 C408.653776,660 380,631.346224 380,596 C380,560.653776 408.653776,532 444,532 L468,532 Z M332,532 C336.418278,532 340,535.581722 340,540 L340,652 C340,656.418278 336.418278,660 332,660 L252,660 C247.581722,660 244,656.418278 244,652 L244,540 C244,535.581722 247.581722,532 252,532 L332,532 Z M580,548 C553.490332,548 532,569.490332 532,596 C532,622.509668 553.490332,644 580,644 C606.509668,644 628,622.509668 628,596 C628,569.490332 606.509668,548 580,548 Z M461,548 L444,548 C417.490332,548 396,569.490332 396,596 C396,622.509668 417.490332,644 444,644 L461,644 L461,548 Z M444,364 C479.346224,364 508,392.653776 508,428 C508,463.346224 479.346224,492 444,492 C408.653776,492 380,463.346224 380,428 C380,392.653776 408.653776,364 444,364 Z M332,364 C336.418278,364 340,367.581722 340,372 C340,376.418278 336.418278,380 332,380 L308,380 C281.490332,380 260,401.490332 260,428 C260,454.509668 281.490332,476 308,476 L332,476 C336.418278,476 340,479.581722 340,484 C340,488.418278 336.418278,492 332,492 L308,492 C272.653776,492 244,463.346224 244,428 C244,392.653776 272.653776,364 308,364 L332,364 Z M580,364 C615.346224,364 644,392.653776 644,428 C644,463.346224 615.346224,492 580,492 L556,492 C551.581722,492 548,488.418278 548,484 L548,372 C548,367.581722 551.581722,364 556,364 L580,364 Z M772,364 C776.418278,364 780,367.581722 780,372 C780,376.418278 776.418278,380 772,380 L700,380 L700,420 L772,420 C776.418278,420 780,423.581722 780,428 C780,432.418278 776.418278,436 772,436 L700,436 L700,476 L772,476 C776.418278,476 780,479.581722 780,484 C780,488.418278 776.418278,492 772,492 L692,492 C687.581722,492 684,488.418278 684,484 L684,372 C684,367.581722 687.581722,364 692,364 L772,364 Z M444,380 C417.490332,380 396,401.490332 396,428 C396,454.509668 417.490332,476 444,476 C470.509668,476 492,454.509668 492,428 C492,401.490332 470.509668,380 444,380 Z M580,380 L563,380 L563,476 L580,476 C606.509668,476 628,454.509668 628,428 C628,401.490332 606.509668,380 580,380 Z"></path></g></svg></a></div><div id="-codedoc-container" class="container"><h1 id="forget" class="heading-0-0-1"><span class="anchor-0-0-2" data-ignore-text=""><span class="icon-font" data-ignore-text="" style="vertical-align: sub">link</span></span>Forget</h1><pre class=""><code class="bash code-0-0-3" tabindex="0"><span class="wmbar-0-0-6"><span></span><span></span><span></span><span></span></span><div class="line-0-0-5 " data-content="autorestic forget [-l, --location] [-a, --all] [--dry-run]"><span class="lineCounter-0-0-4 prim">1</span>autorestic forget <span class="token punctuation">[</span>-l, --location<span class="token punctuation">]</span> <span class="token punctuation">[</span>-a, --all<span class="token punctuation">]</span> <span class="token punctuation">[</span>--dry-run<span class="token punctuation">]</span></div><br></code></pre><p>This will prune and remove old data form the backends according to the <a href="/autorestic/locations/forget">keep policy you have specified for the location</a></p><p>The <code>--dry-run</code> flag will do a dry run showing what would have been deleted, but won't touch the actual data.</p><script id="DcgHOtktxb">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("DcgHOtktxb", "qcaKEY878Mn2dFQW/lSrDg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="contentnav-0-0-14" data-no-search=""><a href="#forget" class="h1" data-content-highlight="forget">Forget</a></div></div><div id="-codedoc-toc" class="toc-0-0-11"><script>
|
||||
if (window.matchMedia('(min-width: 1200px)').matches) {
|
||||
if (!localStorage.getItem('-codedoc-toc-active')) {
|
||||
localStorage.setItem('-codedoc-toc-active', "true");
|
||||
}
|
||||
}
|
||||
</script><div class="content-0-0-12"><p><a href="/autorestic/">Home</a>
|
||||
<a href="/autorestic/quick">Quick Start</a>
|
||||
<a href="/autorestic/installation">Installation</a>
|
||||
<a href="/autorestic/config">Configuration</a></p><div class="collapse-0-0-7 "><script id="tACLKuZBsH">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("tACLKuZBsH", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">Locations</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/location/overview">Overview</a>
|
||||
<a href="/autorestic/location/hooks">Hooks</a>
|
||||
<a href="/autorestic/location/exclude">Excluding Files</a>
|
||||
<a href="/autorestic/location/forget">Forget Policy</a>
|
||||
<a href="/autorestic/location/cron">Cron</a>
|
||||
<a href="/autorestic/location/docker">Docker Volumes</a></p></div></div><div class="collapse-0-0-7 "><script id="MKzDcnYVEW">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("MKzDcnYVEW", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">Backend</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/backend/overview">Overview</a>
|
||||
<a href="/autorestic/backend/available">Available Backends</a></p></div></div><div class="collapse-0-0-7 "><script id="dPGXKBPJVc">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("dPGXKBPJVc", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">CLI</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/cli/info">Info</a>
|
||||
<a href="/autorestic/cli/check">Check</a>
|
||||
<a href="/autorestic/cli/backup">Backup</a>
|
||||
<a href="/autorestic/cli/restore">Restore</a>
|
||||
<a href="/autorestic/cli/forget">Forget</a>
|
||||
<a href="/autorestic/cli/cron">Cron</a>
|
||||
<a href="/autorestic/cli/exec">Exec</a>
|
||||
<a href="/autorestic/cli/install">Install</a>
|
||||
<a href="/autorestic/cli/uninstall">Uninstall</a>
|
||||
<a href="/autorestic/cli/update">Update</a></p></div></div><p><a href="/autorestic/examples">Examples</a></p><p><a href="/autorestic/qa">QA</a></p><p><a href="/autorestic/contrib">Contributors</a></p></div><div class="search-0-0-13"><script id="DQdxfKrIhi">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("DQdxfKrIhi", "+SrlfVhZ/PRQ5WhUlZbTaA==", {"repo":"autorestic","user":"cupcakearmy","root":"docs/md","pick":"\\.md$","drop":"(^_)|(\\/_)"});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div></div><div class="footer-0-0-10"><div class="left"><script id="QKwvZxCWxp">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("QKwvZxCWxp", "XsNW3ht5ee+RmVUActEo9g==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div><div class="main"><div class="inside"><a href="https://github.com/cupcakearmy/autorestic/" target="_blank">GitHub</a></div></div><div class="right"><script id="SMoNkTxSub">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("SMoNkTxSub", "Y1WWvCKxkgk1yh8xbCfXqw==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div></div><script id="ApONrSXgrK">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("ApONrSXgrK", "v641FmLj+AeGp0uuFTI6ug==", {"namespace":"/autorestic"});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></body></html>
|
63
docs/cli/info.html
Normal file
63
docs/cli/info.html
Normal file
@@ -0,0 +1,63 @@
|
||||
<!DOCTYPE html><html><head><title>Autorestic | info</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"><meta name="robots" content="index,follow"><meta name="theme-color" content="#212121"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"><link href="https://fonts.googleapis.com/css?family=Hind:400,700&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:300,400&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined" rel="stylesheet"><style>
|
||||
body, input, button {
|
||||
font-family: 'Hind', sans-serif;
|
||||
}
|
||||
|
||||
code, .hljs {
|
||||
font-family: 'Source Code Pro', 'Courier New', Courier, monospace;
|
||||
}
|
||||
|
||||
.icon-font {
|
||||
font-family: 'Material Icons';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px; /* Preferred icon size */
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: nowrap;
|
||||
direction: ltr;
|
||||
|
||||
/* Support for all WebKit browsers. */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
/* Support for Safari and Chrome. */
|
||||
text-rendering: optimizeLegibility;
|
||||
|
||||
/* Support for Firefox. */
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Support for IE. */
|
||||
font-feature-settings: 'liga';
|
||||
}
|
||||
|
||||
.icon-font.outline {
|
||||
font-family: 'Material Icons Outlined';
|
||||
}
|
||||
</style><link href="/autorestic/./dist/codedoc-styles.css" rel="stylesheet"><script async="" defer="" src="/autorestic/./dist/codedoc-bundle.js"></script></head><body><div class="header-0-0-9"><script async="" defer="" src="https://buttons.github.io/buttons.js"></script><a class="github-button" data-color-scheme="no-preference: light; light: light; dark: dark;" data-icon="false" data-show-count="true" data-size="false" href="https://github.com/cupcakearmy/autorestic/">Star</a><br><br><a class="watermark-0-0-8" href="https://github.com/CONNECT-platform/codedoc" target="_blank">Created With<svg viewBox="0 0 536 296" version="1.1" xmlns="http://www.w3.org/2000/svg"><g id="codedoc" transform="translate(-244.000000, -364.000000)" fill-rule="nonzero"><path d="M580,532 C615.346224,532 644,560.653776 644,596 C644,631.346224 615.346224,660 580,660 C544.653776,660 516,631.346224 516,596 C516,560.653776 544.653776,532 580,532 Z M716,532 C751.346224,532 780,560.653776 780,596 C780,631.346224 751.346224,660 716,660 L692,660 C687.581722,660 684,656.418278 684,652 C684,647.581722 687.581722,644 692,644 L716,644 C742.509668,644 764,622.509668 764,596 C764,569.490332 742.509668,548 716,548 L692,548 C687.581722,548 684,544.418278 684,540 C684,535.581722 687.581722,532 692,532 L716,532 Z M468,532 C472.418278,532 476,535.581722 476,540 L476,652 C476,656.418278 472.418278,660 468,660 L444,660 C408.653776,660 380,631.346224 380,596 C380,560.653776 408.653776,532 444,532 L468,532 Z M332,532 C336.418278,532 340,535.581722 340,540 L340,652 C340,656.418278 336.418278,660 332,660 L252,660 C247.581722,660 244,656.418278 244,652 L244,540 C244,535.581722 247.581722,532 252,532 L332,532 Z M580,548 C553.490332,548 532,569.490332 532,596 C532,622.509668 553.490332,644 580,644 C606.509668,644 628,622.509668 628,596 C628,569.490332 606.509668,548 580,548 Z M461,548 L444,548 C417.490332,548 396,569.490332 396,596 C396,622.509668 417.490332,644 444,644 L461,644 L461,548 Z M444,364 C479.346224,364 508,392.653776 508,428 C508,463.346224 479.346224,492 444,492 C408.653776,492 380,463.346224 380,428 C380,392.653776 408.653776,364 444,364 Z M332,364 C336.418278,364 340,367.581722 340,372 C340,376.418278 336.418278,380 332,380 L308,380 C281.490332,380 260,401.490332 260,428 C260,454.509668 281.490332,476 308,476 L332,476 C336.418278,476 340,479.581722 340,484 C340,488.418278 336.418278,492 332,492 L308,492 C272.653776,492 244,463.346224 244,428 C244,392.653776 272.653776,364 308,364 L332,364 Z M580,364 C615.346224,364 644,392.653776 644,428 C644,463.346224 615.346224,492 580,492 L556,492 C551.581722,492 548,488.418278 548,484 L548,372 C548,367.581722 551.581722,364 556,364 L580,364 Z M772,364 C776.418278,364 780,367.581722 780,372 C780,376.418278 776.418278,380 772,380 L700,380 L700,420 L772,420 C776.418278,420 780,423.581722 780,428 C780,432.418278 776.418278,436 772,436 L700,436 L700,476 L772,476 C776.418278,476 780,479.581722 780,484 C780,488.418278 776.418278,492 772,492 L692,492 C687.581722,492 684,488.418278 684,484 L684,372 C684,367.581722 687.581722,364 692,364 L772,364 Z M444,380 C417.490332,380 396,401.490332 396,428 C396,454.509668 417.490332,476 444,476 C470.509668,476 492,454.509668 492,428 C492,401.490332 470.509668,380 444,380 Z M580,380 L563,380 L563,476 L580,476 C606.509668,476 628,454.509668 628,428 C628,401.490332 606.509668,380 580,380 Z"></path></g></svg></a></div><div id="-codedoc-container" class="container"><h1 id="info" class="heading-0-0-1"><span class="anchor-0-0-2" data-ignore-text=""><span class="icon-font" data-ignore-text="" style="vertical-align: sub">link</span></span>info</h1><p>Displays the config file that autorestic is refering to.
|
||||
Usefull when you want to quickly see what locations are being backuped where.</p><p><strong>Pro tip:</strong> if it gets a bit long you can read it more easily with <code>autorestic info | less</code> 😉</p><pre class=""><code class="bash code-0-0-3" tabindex="0"><span class="wmbar-0-0-6"><span></span><span></span><span></span><span></span></span><div class="line-0-0-5 " data-content="autorestic info"><span class="lineCounter-0-0-4 prim">1</span>autorestic info</div><br></code></pre><h2 id="with-a-custom-file" class="heading-0-0-1"><span class="anchor-0-0-2" data-ignore-text=""><span class="icon-font" data-ignore-text="" style="vertical-align: sub">link</span></span>With a custom file</h2><pre class=""><code class="bash code-0-0-3" tabindex="0"><span class="wmbar-0-0-6"><span></span><span></span><span></span><span></span></span><div class="line-0-0-5 " data-content="autorestic -c path/to/some/config.yml info"><span class="lineCounter-0-0-4 prim">1</span>autorestic -c path/to/some/config.yml info</div><br></code></pre><script id="cyWvvmpORV">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("cyWvvmpORV", "qcaKEY878Mn2dFQW/lSrDg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="contentnav-0-0-14" data-no-search=""><a href="#info" class="h1" data-content-highlight="info">info</a><a href="#with-a-custom-file" class="h2" data-content-highlight="with-a-custom-file">With a custom file</a></div></div><div id="-codedoc-toc" class="toc-0-0-11"><script>
|
||||
if (window.matchMedia('(min-width: 1200px)').matches) {
|
||||
if (!localStorage.getItem('-codedoc-toc-active')) {
|
||||
localStorage.setItem('-codedoc-toc-active', "true");
|
||||
}
|
||||
}
|
||||
</script><div class="content-0-0-12"><p><a href="/autorestic/">Home</a>
|
||||
<a href="/autorestic/quick">Quick Start</a>
|
||||
<a href="/autorestic/installation">Installation</a>
|
||||
<a href="/autorestic/config">Configuration</a></p><div class="collapse-0-0-7 "><script id="gUyULxzczB">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("gUyULxzczB", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">Locations</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/location/overview">Overview</a>
|
||||
<a href="/autorestic/location/hooks">Hooks</a>
|
||||
<a href="/autorestic/location/exclude">Excluding Files</a>
|
||||
<a href="/autorestic/location/forget">Forget Policy</a>
|
||||
<a href="/autorestic/location/cron">Cron</a>
|
||||
<a href="/autorestic/location/docker">Docker Volumes</a></p></div></div><div class="collapse-0-0-7 "><script id="MhYkwVUPYW">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("MhYkwVUPYW", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">Backend</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/backend/overview">Overview</a>
|
||||
<a href="/autorestic/backend/available">Available Backends</a></p></div></div><div class="collapse-0-0-7 "><script id="abOCNyMXuD">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("abOCNyMXuD", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">CLI</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/cli/info">Info</a>
|
||||
<a href="/autorestic/cli/check">Check</a>
|
||||
<a href="/autorestic/cli/backup">Backup</a>
|
||||
<a href="/autorestic/cli/restore">Restore</a>
|
||||
<a href="/autorestic/cli/forget">Forget</a>
|
||||
<a href="/autorestic/cli/cron">Cron</a>
|
||||
<a href="/autorestic/cli/exec">Exec</a>
|
||||
<a href="/autorestic/cli/install">Install</a>
|
||||
<a href="/autorestic/cli/uninstall">Uninstall</a>
|
||||
<a href="/autorestic/cli/update">Update</a></p></div></div><p><a href="/autorestic/examples">Examples</a></p><p><a href="/autorestic/qa">QA</a></p><p><a href="/autorestic/contrib">Contributors</a></p></div><div class="search-0-0-13"><script id="CYYxQgWJrd">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("CYYxQgWJrd", "+SrlfVhZ/PRQ5WhUlZbTaA==", {"repo":"autorestic","user":"cupcakearmy","root":"docs/md","pick":"\\.md$","drop":"(^_)|(\\/_)"});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div></div><div class="footer-0-0-10"><div class="left"><script id="ZZYHkrvPJS">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("ZZYHkrvPJS", "XsNW3ht5ee+RmVUActEo9g==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div><div class="main"><div class="inside"><a href="https://github.com/cupcakearmy/autorestic/" target="_blank">GitHub</a></div></div><div class="right"><script id="cny_qtwMwK">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("cny_qtwMwK", "Y1WWvCKxkgk1yh8xbCfXqw==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div></div><script id="FKnSWsMYTk">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("FKnSWsMYTk", "v641FmLj+AeGp0uuFTI6ug==", {"namespace":"/autorestic"});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></body></html>
|
56
docs/cli/install copy.html
Normal file
56
docs/cli/install copy.html
Normal file
@@ -0,0 +1,56 @@
|
||||
<!DOCTYPE html><html><head><title>Autorestic | Install</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"><meta name="robots" content="index,follow"><meta name="theme-color" content="#212121"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"><link href="https://fonts.googleapis.com/css?family=Hind:400,700&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:300,400&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined" rel="stylesheet"><style>
|
||||
body, input, button {
|
||||
font-family: 'Hind', sans-serif;
|
||||
}
|
||||
|
||||
code, .hljs {
|
||||
font-family: 'Source Code Pro', 'Courier New', Courier, monospace;
|
||||
}
|
||||
|
||||
.icon-font {
|
||||
font-family: 'Material Icons';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px; /* Preferred icon size */
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: nowrap;
|
||||
direction: ltr;
|
||||
|
||||
/* Support for all WebKit browsers. */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
/* Support for Safari and Chrome. */
|
||||
text-rendering: optimizeLegibility;
|
||||
|
||||
/* Support for Firefox. */
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Support for IE. */
|
||||
font-feature-settings: 'liga';
|
||||
}
|
||||
|
||||
.icon-font.outline {
|
||||
font-family: 'Material Icons Outlined';
|
||||
}
|
||||
</style><link href="/autorestic/docs/assets/codedoc-styles.css" rel="stylesheet"><script async="" defer="" src="/autorestic/docs/assets/codedoc-bundle.js"></script></head><body><div class="header-0-0-5"><script async="" defer="" src="https://buttons.github.io/buttons.js"></script><a class="github-button" data-color-scheme="no-preference: light; light: light; dark: dark;" data-icon="false" data-show-count="true" data-size="false" href="https://github.com/cupcakearmy/autorestic/">Star</a><br><br><a class="watermark-0-0-4" href="https://github.com/CONNECT-platform/codedoc" target="_blank">Created With<svg viewBox="0 0 536 296" version="1.1" xmlns="http://www.w3.org/2000/svg"><g id="codedoc" transform="translate(-244.000000, -364.000000)" fill-rule="nonzero"><path d="M580,532 C615.346224,532 644,560.653776 644,596 C644,631.346224 615.346224,660 580,660 C544.653776,660 516,631.346224 516,596 C516,560.653776 544.653776,532 580,532 Z M716,532 C751.346224,532 780,560.653776 780,596 C780,631.346224 751.346224,660 716,660 L692,660 C687.581722,660 684,656.418278 684,652 C684,647.581722 687.581722,644 692,644 L716,644 C742.509668,644 764,622.509668 764,596 C764,569.490332 742.509668,548 716,548 L692,548 C687.581722,548 684,544.418278 684,540 C684,535.581722 687.581722,532 692,532 L716,532 Z M468,532 C472.418278,532 476,535.581722 476,540 L476,652 C476,656.418278 472.418278,660 468,660 L444,660 C408.653776,660 380,631.346224 380,596 C380,560.653776 408.653776,532 444,532 L468,532 Z M332,532 C336.418278,532 340,535.581722 340,540 L340,652 C340,656.418278 336.418278,660 332,660 L252,660 C247.581722,660 244,656.418278 244,652 L244,540 C244,535.581722 247.581722,532 252,532 L332,532 Z M580,548 C553.490332,548 532,569.490332 532,596 C532,622.509668 553.490332,644 580,644 C606.509668,644 628,622.509668 628,596 C628,569.490332 606.509668,548 580,548 Z M461,548 L444,548 C417.490332,548 396,569.490332 396,596 C396,622.509668 417.490332,644 444,644 L461,644 L461,548 Z M444,364 C479.346224,364 508,392.653776 508,428 C508,463.346224 479.346224,492 444,492 C408.653776,492 380,463.346224 380,428 C380,392.653776 408.653776,364 444,364 Z M332,364 C336.418278,364 340,367.581722 340,372 C340,376.418278 336.418278,380 332,380 L308,380 C281.490332,380 260,401.490332 260,428 C260,454.509668 281.490332,476 308,476 L332,476 C336.418278,476 340,479.581722 340,484 C340,488.418278 336.418278,492 332,492 L308,492 C272.653776,492 244,463.346224 244,428 C244,392.653776 272.653776,364 308,364 L332,364 Z M580,364 C615.346224,364 644,392.653776 644,428 C644,463.346224 615.346224,492 580,492 L556,492 C551.581722,492 548,488.418278 548,484 L548,372 C548,367.581722 551.581722,364 556,364 L580,364 Z M772,364 C776.418278,364 780,367.581722 780,372 C780,376.418278 776.418278,380 772,380 L700,380 L700,420 L772,420 C776.418278,420 780,423.581722 780,428 C780,432.418278 776.418278,436 772,436 L700,436 L700,476 L772,476 C776.418278,476 780,479.581722 780,484 C780,488.418278 776.418278,492 772,492 L692,492 C687.581722,492 684,488.418278 684,484 L684,372 C684,367.581722 687.581722,364 692,364 L772,364 Z M444,380 C417.490332,380 396,401.490332 396,428 C396,454.509668 417.490332,476 444,476 C470.509668,476 492,454.509668 492,428 C492,401.490332 470.509668,380 444,380 Z M580,380 L563,380 L563,476 L580,476 C606.509668,476 628,454.509668 628,428 C628,401.490332 606.509668,380 580,380 Z"></path></g></svg></a></div><div id="-codedoc-container" class="container"><h1 id="install" class="heading-0-0-1"><span class="anchor-0-0-2" data-ignore-text=""><span class="icon-font" data-ignore-text="" style="vertical-align: sub">link</span></span>Install</h1><p>Installs both restic and autorestic to <code>/usr/local/bin</code>.</p><pre class=""><code class="bash code-0-0-11" tabindex="0"><span class="wmbar-0-0-14"><span></span><span></span><span></span><span></span></span><div class="line-0-0-13 " data-content="autorestic install"><span class="lineCounter-0-0-12 prim">1</span>autorestic <span class="token function">install</span></div><br></code></pre><div class="contentnav-0-0-10" data-no-search=""><a href="#install" class="h1" data-content-highlight="install">Install</a></div></div><div id="-codedoc-toc" class="toc-0-0-7"><div class="content-0-0-8"><p><a href="/autorestic/">Home</a>
|
||||
<a href="/autorestic/installation">Installation</a>
|
||||
<a href="/autorestic/config">Configuration</a></p><div class="collapse-0-0-3 "><script id="XRGCUvVncP">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("XRGCUvVncP", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">Locations</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/locations/overview">Overview</a>
|
||||
<a href="/autorestic/locations/types">Types</a>
|
||||
<a href="/autorestic/locations/cron">Cron</a>
|
||||
<a href="/autorestic/locations/hooks">Hooks</a>
|
||||
<a href="/autorestic/locations/exclude">Exclude</a>
|
||||
<a href="/autorestic/locations/forget">Forget Policy</a>
|
||||
<a href="/autorestic/locations/advanced">Advanced Options</a></p></div></div><div class="collapse-0-0-3 "><script id="friLMtMuGC">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("friLMtMuGC", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">Backend</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/backend/overview">Overview</a>
|
||||
<a href="/autorestic/backend/available">Available Backends</a></p></div></div><div class="collapse-0-0-3 "><script id="anTYnIWqbu">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("anTYnIWqbu", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">CLI</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/cli/info">Info</a>
|
||||
<a href="/autorestic/cli/check">Check</a>
|
||||
<a href="/autorestic/cli/backup">Backup</a>
|
||||
<a href="/autorestic/cli/restore">Restore</a>
|
||||
<a href="/autorestic/cli/forget">Forget</a>
|
||||
<a href="/autorestic/cli/cron">Cron</a>
|
||||
<a href="/autorestic/cli/exec">Exec</a>
|
||||
<a href="/autorestic/cli/install">Install</a>
|
||||
<a href="/autorestic/cli/uninstall">Uninstall</a>
|
||||
<a href="/autorestic/cli/update">Update</a></p></div></div><p><a href="/autorestic/examples">Examples</a></p><p><a href="/autorestic/qa">QA</a></p><p><a href="/autorestic/contrib">Contributors</a></p></div><div class="search-0-0-9"><script id="jzgqiz_Esn">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("jzgqiz_Esn", "+SrlfVhZ/PRQ5WhUlZbTaA==", {"repo":"autorestic","user":"cupcakearmy","root":"docs/md","pick":"\\.md$","drop":"(^_)|(\\/_)"});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div></div><div class="footer-0-0-6"><div class="left"><script id="asTmHrhSzG">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("asTmHrhSzG", "XsNW3ht5ee+RmVUActEo9g==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div><div class="main"><div class="inside"><a href="https://github.com/cupcakearmy/autorestic/" target="_blank">GitHub</a></div></div><div class="right"><script id="LyCwkXYPUl">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("LyCwkXYPUl", "Y1WWvCKxkgk1yh8xbCfXqw==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div></div><script id="mhGgCSJbMB">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("mhGgCSJbMB", "v641FmLj+AeGp0uuFTI6ug==", {"namespace":"/autorestic"});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></body></html>
|
62
docs/cli/install.html
Normal file
62
docs/cli/install.html
Normal file
@@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html><html><head><title>Autorestic | Install</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"><meta name="robots" content="index,follow"><meta name="theme-color" content="#212121"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"><link href="https://fonts.googleapis.com/css?family=Hind:400,700&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:300,400&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined" rel="stylesheet"><style>
|
||||
body, input, button {
|
||||
font-family: 'Hind', sans-serif;
|
||||
}
|
||||
|
||||
code, .hljs {
|
||||
font-family: 'Source Code Pro', 'Courier New', Courier, monospace;
|
||||
}
|
||||
|
||||
.icon-font {
|
||||
font-family: 'Material Icons';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px; /* Preferred icon size */
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: nowrap;
|
||||
direction: ltr;
|
||||
|
||||
/* Support for all WebKit browsers. */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
/* Support for Safari and Chrome. */
|
||||
text-rendering: optimizeLegibility;
|
||||
|
||||
/* Support for Firefox. */
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Support for IE. */
|
||||
font-feature-settings: 'liga';
|
||||
}
|
||||
|
||||
.icon-font.outline {
|
||||
font-family: 'Material Icons Outlined';
|
||||
}
|
||||
</style><link href="/autorestic/./dist/codedoc-styles.css" rel="stylesheet"><script async="" defer="" src="/autorestic/./dist/codedoc-bundle.js"></script></head><body><div class="header-0-0-9"><script async="" defer="" src="https://buttons.github.io/buttons.js"></script><a class="github-button" data-color-scheme="no-preference: light; light: light; dark: dark;" data-icon="false" data-show-count="true" data-size="false" href="https://github.com/cupcakearmy/autorestic/">Star</a><br><br><a class="watermark-0-0-8" href="https://github.com/CONNECT-platform/codedoc" target="_blank">Created With<svg viewBox="0 0 536 296" version="1.1" xmlns="http://www.w3.org/2000/svg"><g id="codedoc" transform="translate(-244.000000, -364.000000)" fill-rule="nonzero"><path d="M580,532 C615.346224,532 644,560.653776 644,596 C644,631.346224 615.346224,660 580,660 C544.653776,660 516,631.346224 516,596 C516,560.653776 544.653776,532 580,532 Z M716,532 C751.346224,532 780,560.653776 780,596 C780,631.346224 751.346224,660 716,660 L692,660 C687.581722,660 684,656.418278 684,652 C684,647.581722 687.581722,644 692,644 L716,644 C742.509668,644 764,622.509668 764,596 C764,569.490332 742.509668,548 716,548 L692,548 C687.581722,548 684,544.418278 684,540 C684,535.581722 687.581722,532 692,532 L716,532 Z M468,532 C472.418278,532 476,535.581722 476,540 L476,652 C476,656.418278 472.418278,660 468,660 L444,660 C408.653776,660 380,631.346224 380,596 C380,560.653776 408.653776,532 444,532 L468,532 Z M332,532 C336.418278,532 340,535.581722 340,540 L340,652 C340,656.418278 336.418278,660 332,660 L252,660 C247.581722,660 244,656.418278 244,652 L244,540 C244,535.581722 247.581722,532 252,532 L332,532 Z M580,548 C553.490332,548 532,569.490332 532,596 C532,622.509668 553.490332,644 580,644 C606.509668,644 628,622.509668 628,596 C628,569.490332 606.509668,548 580,548 Z M461,548 L444,548 C417.490332,548 396,569.490332 396,596 C396,622.509668 417.490332,644 444,644 L461,644 L461,548 Z M444,364 C479.346224,364 508,392.653776 508,428 C508,463.346224 479.346224,492 444,492 C408.653776,492 380,463.346224 380,428 C380,392.653776 408.653776,364 444,364 Z M332,364 C336.418278,364 340,367.581722 340,372 C340,376.418278 336.418278,380 332,380 L308,380 C281.490332,380 260,401.490332 260,428 C260,454.509668 281.490332,476 308,476 L332,476 C336.418278,476 340,479.581722 340,484 C340,488.418278 336.418278,492 332,492 L308,492 C272.653776,492 244,463.346224 244,428 C244,392.653776 272.653776,364 308,364 L332,364 Z M580,364 C615.346224,364 644,392.653776 644,428 C644,463.346224 615.346224,492 580,492 L556,492 C551.581722,492 548,488.418278 548,484 L548,372 C548,367.581722 551.581722,364 556,364 L580,364 Z M772,364 C776.418278,364 780,367.581722 780,372 C780,376.418278 776.418278,380 772,380 L700,380 L700,420 L772,420 C776.418278,420 780,423.581722 780,428 C780,432.418278 776.418278,436 772,436 L700,436 L700,476 L772,476 C776.418278,476 780,479.581722 780,484 C780,488.418278 776.418278,492 772,492 L692,492 C687.581722,492 684,488.418278 684,484 L684,372 C684,367.581722 687.581722,364 692,364 L772,364 Z M444,380 C417.490332,380 396,401.490332 396,428 C396,454.509668 417.490332,476 444,476 C470.509668,476 492,454.509668 492,428 C492,401.490332 470.509668,380 444,380 Z M580,380 L563,380 L563,476 L580,476 C606.509668,476 628,454.509668 628,428 C628,401.490332 606.509668,380 580,380 Z"></path></g></svg></a></div><div id="-codedoc-container" class="container"><h1 id="install" class="heading-0-0-1"><span class="anchor-0-0-2" data-ignore-text=""><span class="icon-font" data-ignore-text="" style="vertical-align: sub">link</span></span>Install</h1><p>Installs both restic and autorestic to <code>/usr/local/bin</code>.</p><pre class=""><code class="bash code-0-0-3" tabindex="0"><span class="wmbar-0-0-6"><span></span><span></span><span></span><span></span></span><div class="line-0-0-5 " data-content="autorestic install"><span class="lineCounter-0-0-4 prim">1</span>autorestic <span class="token function">install</span></div><br></code></pre><script id="LRtUtgSHBS">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("LRtUtgSHBS", "qcaKEY878Mn2dFQW/lSrDg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="contentnav-0-0-14" data-no-search=""><a href="#install" class="h1" data-content-highlight="install">Install</a></div></div><div id="-codedoc-toc" class="toc-0-0-11"><script>
|
||||
if (window.matchMedia('(min-width: 1200px)').matches) {
|
||||
if (!localStorage.getItem('-codedoc-toc-active')) {
|
||||
localStorage.setItem('-codedoc-toc-active', "true");
|
||||
}
|
||||
}
|
||||
</script><div class="content-0-0-12"><p><a href="/autorestic/">Home</a>
|
||||
<a href="/autorestic/quick">Quick Start</a>
|
||||
<a href="/autorestic/installation">Installation</a>
|
||||
<a href="/autorestic/config">Configuration</a></p><div class="collapse-0-0-7 "><script id="JHSiANFmwJ">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("JHSiANFmwJ", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">Locations</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/location/overview">Overview</a>
|
||||
<a href="/autorestic/location/hooks">Hooks</a>
|
||||
<a href="/autorestic/location/exclude">Excluding Files</a>
|
||||
<a href="/autorestic/location/forget">Forget Policy</a>
|
||||
<a href="/autorestic/location/cron">Cron</a>
|
||||
<a href="/autorestic/location/docker">Docker Volumes</a></p></div></div><div class="collapse-0-0-7 "><script id="lVcOeMUAiC">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("lVcOeMUAiC", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">Backend</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/backend/overview">Overview</a>
|
||||
<a href="/autorestic/backend/available">Available Backends</a></p></div></div><div class="collapse-0-0-7 "><script id="KgvcizNlzH">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("KgvcizNlzH", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">CLI</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/cli/info">Info</a>
|
||||
<a href="/autorestic/cli/check">Check</a>
|
||||
<a href="/autorestic/cli/backup">Backup</a>
|
||||
<a href="/autorestic/cli/restore">Restore</a>
|
||||
<a href="/autorestic/cli/forget">Forget</a>
|
||||
<a href="/autorestic/cli/cron">Cron</a>
|
||||
<a href="/autorestic/cli/exec">Exec</a>
|
||||
<a href="/autorestic/cli/install">Install</a>
|
||||
<a href="/autorestic/cli/uninstall">Uninstall</a>
|
||||
<a href="/autorestic/cli/update">Update</a></p></div></div><p><a href="/autorestic/examples">Examples</a></p><p><a href="/autorestic/qa">QA</a></p><p><a href="/autorestic/contrib">Contributors</a></p></div><div class="search-0-0-13"><script id="VFcyVpVFdn">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("VFcyVpVFdn", "+SrlfVhZ/PRQ5WhUlZbTaA==", {"repo":"autorestic","user":"cupcakearmy","root":"docs/md","pick":"\\.md$","drop":"(^_)|(\\/_)"});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div></div><div class="footer-0-0-10"><div class="left"><script id="uHxBmathuF">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("uHxBmathuF", "XsNW3ht5ee+RmVUActEo9g==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div><div class="main"><div class="inside"><a href="https://github.com/cupcakearmy/autorestic/" target="_blank">GitHub</a></div></div><div class="right"><script id="nVDKMEfzUZ">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("nVDKMEfzUZ", "Y1WWvCKxkgk1yh8xbCfXqw==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div></div><script id="gCzewouufz">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("gCzewouufz", "v641FmLj+AeGp0uuFTI6ug==", {"namespace":"/autorestic"});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></body></html>
|
62
docs/cli/restore.html
Normal file
62
docs/cli/restore.html
Normal file
File diff suppressed because one or more lines are too long
62
docs/cli/uninstall.html
Normal file
62
docs/cli/uninstall.html
Normal file
@@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html><html><head><title>Autorestic | Uninstall</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"><meta name="robots" content="index,follow"><meta name="theme-color" content="#212121"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"><link href="https://fonts.googleapis.com/css?family=Hind:400,700&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:300,400&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined" rel="stylesheet"><style>
|
||||
body, input, button {
|
||||
font-family: 'Hind', sans-serif;
|
||||
}
|
||||
|
||||
code, .hljs {
|
||||
font-family: 'Source Code Pro', 'Courier New', Courier, monospace;
|
||||
}
|
||||
|
||||
.icon-font {
|
||||
font-family: 'Material Icons';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px; /* Preferred icon size */
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: nowrap;
|
||||
direction: ltr;
|
||||
|
||||
/* Support for all WebKit browsers. */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
/* Support for Safari and Chrome. */
|
||||
text-rendering: optimizeLegibility;
|
||||
|
||||
/* Support for Firefox. */
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Support for IE. */
|
||||
font-feature-settings: 'liga';
|
||||
}
|
||||
|
||||
.icon-font.outline {
|
||||
font-family: 'Material Icons Outlined';
|
||||
}
|
||||
</style><link href="/autorestic/./dist/codedoc-styles.css" rel="stylesheet"><script async="" defer="" src="/autorestic/./dist/codedoc-bundle.js"></script></head><body><div class="header-0-0-9"><script async="" defer="" src="https://buttons.github.io/buttons.js"></script><a class="github-button" data-color-scheme="no-preference: light; light: light; dark: dark;" data-icon="false" data-show-count="true" data-size="false" href="https://github.com/cupcakearmy/autorestic/">Star</a><br><br><a class="watermark-0-0-8" href="https://github.com/CONNECT-platform/codedoc" target="_blank">Created With<svg viewBox="0 0 536 296" version="1.1" xmlns="http://www.w3.org/2000/svg"><g id="codedoc" transform="translate(-244.000000, -364.000000)" fill-rule="nonzero"><path d="M580,532 C615.346224,532 644,560.653776 644,596 C644,631.346224 615.346224,660 580,660 C544.653776,660 516,631.346224 516,596 C516,560.653776 544.653776,532 580,532 Z M716,532 C751.346224,532 780,560.653776 780,596 C780,631.346224 751.346224,660 716,660 L692,660 C687.581722,660 684,656.418278 684,652 C684,647.581722 687.581722,644 692,644 L716,644 C742.509668,644 764,622.509668 764,596 C764,569.490332 742.509668,548 716,548 L692,548 C687.581722,548 684,544.418278 684,540 C684,535.581722 687.581722,532 692,532 L716,532 Z M468,532 C472.418278,532 476,535.581722 476,540 L476,652 C476,656.418278 472.418278,660 468,660 L444,660 C408.653776,660 380,631.346224 380,596 C380,560.653776 408.653776,532 444,532 L468,532 Z M332,532 C336.418278,532 340,535.581722 340,540 L340,652 C340,656.418278 336.418278,660 332,660 L252,660 C247.581722,660 244,656.418278 244,652 L244,540 C244,535.581722 247.581722,532 252,532 L332,532 Z M580,548 C553.490332,548 532,569.490332 532,596 C532,622.509668 553.490332,644 580,644 C606.509668,644 628,622.509668 628,596 C628,569.490332 606.509668,548 580,548 Z M461,548 L444,548 C417.490332,548 396,569.490332 396,596 C396,622.509668 417.490332,644 444,644 L461,644 L461,548 Z M444,364 C479.346224,364 508,392.653776 508,428 C508,463.346224 479.346224,492 444,492 C408.653776,492 380,463.346224 380,428 C380,392.653776 408.653776,364 444,364 Z M332,364 C336.418278,364 340,367.581722 340,372 C340,376.418278 336.418278,380 332,380 L308,380 C281.490332,380 260,401.490332 260,428 C260,454.509668 281.490332,476 308,476 L332,476 C336.418278,476 340,479.581722 340,484 C340,488.418278 336.418278,492 332,492 L308,492 C272.653776,492 244,463.346224 244,428 C244,392.653776 272.653776,364 308,364 L332,364 Z M580,364 C615.346224,364 644,392.653776 644,428 C644,463.346224 615.346224,492 580,492 L556,492 C551.581722,492 548,488.418278 548,484 L548,372 C548,367.581722 551.581722,364 556,364 L580,364 Z M772,364 C776.418278,364 780,367.581722 780,372 C780,376.418278 776.418278,380 772,380 L700,380 L700,420 L772,420 C776.418278,420 780,423.581722 780,428 C780,432.418278 776.418278,436 772,436 L700,436 L700,476 L772,476 C776.418278,476 780,479.581722 780,484 C780,488.418278 776.418278,492 772,492 L692,492 C687.581722,492 684,488.418278 684,484 L684,372 C684,367.581722 687.581722,364 692,364 L772,364 Z M444,380 C417.490332,380 396,401.490332 396,428 C396,454.509668 417.490332,476 444,476 C470.509668,476 492,454.509668 492,428 C492,401.490332 470.509668,380 444,380 Z M580,380 L563,380 L563,476 L580,476 C606.509668,476 628,454.509668 628,428 C628,401.490332 606.509668,380 580,380 Z"></path></g></svg></a></div><div id="-codedoc-container" class="container"><h1 id="uninstall" class="heading-0-0-1"><span class="anchor-0-0-2" data-ignore-text=""><span class="icon-font" data-ignore-text="" style="vertical-align: sub">link</span></span>Uninstall</h1><p>Installs both restic and autorestic from <code>/usr/local/bin</code>.</p><pre class=""><code class="bash code-0-0-3" tabindex="0"><span class="wmbar-0-0-6"><span></span><span></span><span></span><span></span></span><div class="line-0-0-5 " data-content="autorestic uninstall"><span class="lineCounter-0-0-4 prim">1</span>autorestic uninstall</div><br></code></pre><script id="wpUphxIJXZ">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("wpUphxIJXZ", "qcaKEY878Mn2dFQW/lSrDg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="contentnav-0-0-14" data-no-search=""><a href="#uninstall" class="h1" data-content-highlight="uninstall">Uninstall</a></div></div><div id="-codedoc-toc" class="toc-0-0-11"><script>
|
||||
if (window.matchMedia('(min-width: 1200px)').matches) {
|
||||
if (!localStorage.getItem('-codedoc-toc-active')) {
|
||||
localStorage.setItem('-codedoc-toc-active', "true");
|
||||
}
|
||||
}
|
||||
</script><div class="content-0-0-12"><p><a href="/autorestic/">Home</a>
|
||||
<a href="/autorestic/quick">Quick Start</a>
|
||||
<a href="/autorestic/installation">Installation</a>
|
||||
<a href="/autorestic/config">Configuration</a></p><div class="collapse-0-0-7 "><script id="hQMZGnRftr">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("hQMZGnRftr", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">Locations</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/location/overview">Overview</a>
|
||||
<a href="/autorestic/location/hooks">Hooks</a>
|
||||
<a href="/autorestic/location/exclude">Excluding Files</a>
|
||||
<a href="/autorestic/location/forget">Forget Policy</a>
|
||||
<a href="/autorestic/location/cron">Cron</a>
|
||||
<a href="/autorestic/location/docker">Docker Volumes</a></p></div></div><div class="collapse-0-0-7 "><script id="jmZmZdTPGt">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("jmZmZdTPGt", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">Backend</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/backend/overview">Overview</a>
|
||||
<a href="/autorestic/backend/available">Available Backends</a></p></div></div><div class="collapse-0-0-7 "><script id="LptFqGvoCB">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("LptFqGvoCB", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">CLI</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/cli/info">Info</a>
|
||||
<a href="/autorestic/cli/check">Check</a>
|
||||
<a href="/autorestic/cli/backup">Backup</a>
|
||||
<a href="/autorestic/cli/restore">Restore</a>
|
||||
<a href="/autorestic/cli/forget">Forget</a>
|
||||
<a href="/autorestic/cli/cron">Cron</a>
|
||||
<a href="/autorestic/cli/exec">Exec</a>
|
||||
<a href="/autorestic/cli/install">Install</a>
|
||||
<a href="/autorestic/cli/uninstall">Uninstall</a>
|
||||
<a href="/autorestic/cli/update">Update</a></p></div></div><p><a href="/autorestic/examples">Examples</a></p><p><a href="/autorestic/qa">QA</a></p><p><a href="/autorestic/contrib">Contributors</a></p></div><div class="search-0-0-13"><script id="HrKeUbfNsZ">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("HrKeUbfNsZ", "+SrlfVhZ/PRQ5WhUlZbTaA==", {"repo":"autorestic","user":"cupcakearmy","root":"docs/md","pick":"\\.md$","drop":"(^_)|(\\/_)"});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div></div><div class="footer-0-0-10"><div class="left"><script id="hFL_PgPIpk">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("hFL_PgPIpk", "XsNW3ht5ee+RmVUActEo9g==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div><div class="main"><div class="inside"><a href="https://github.com/cupcakearmy/autorestic/" target="_blank">GitHub</a></div></div><div class="right"><script id="XfWxznVVHs">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("XfWxznVVHs", "Y1WWvCKxkgk1yh8xbCfXqw==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div></div><script id="sMXjcsWFyG">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("sMXjcsWFyG", "v641FmLj+AeGp0uuFTI6ug==", {"namespace":"/autorestic"});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></body></html>
|
62
docs/cli/update.html
Normal file
62
docs/cli/update.html
Normal file
@@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html><html><head><title>Autorestic | Update</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"><meta name="robots" content="index,follow"><meta name="theme-color" content="#212121"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"><link href="https://fonts.googleapis.com/css?family=Hind:400,700&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:300,400&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined" rel="stylesheet"><style>
|
||||
body, input, button {
|
||||
font-family: 'Hind', sans-serif;
|
||||
}
|
||||
|
||||
code, .hljs {
|
||||
font-family: 'Source Code Pro', 'Courier New', Courier, monospace;
|
||||
}
|
||||
|
||||
.icon-font {
|
||||
font-family: 'Material Icons';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px; /* Preferred icon size */
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: nowrap;
|
||||
direction: ltr;
|
||||
|
||||
/* Support for all WebKit browsers. */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
/* Support for Safari and Chrome. */
|
||||
text-rendering: optimizeLegibility;
|
||||
|
||||
/* Support for Firefox. */
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Support for IE. */
|
||||
font-feature-settings: 'liga';
|
||||
}
|
||||
|
||||
.icon-font.outline {
|
||||
font-family: 'Material Icons Outlined';
|
||||
}
|
||||
</style><link href="/autorestic/./dist/codedoc-styles.css" rel="stylesheet"><script async="" defer="" src="/autorestic/./dist/codedoc-bundle.js"></script></head><body><div class="header-0-0-9"><script async="" defer="" src="https://buttons.github.io/buttons.js"></script><a class="github-button" data-color-scheme="no-preference: light; light: light; dark: dark;" data-icon="false" data-show-count="true" data-size="false" href="https://github.com/cupcakearmy/autorestic/">Star</a><br><br><a class="watermark-0-0-8" href="https://github.com/CONNECT-platform/codedoc" target="_blank">Created With<svg viewBox="0 0 536 296" version="1.1" xmlns="http://www.w3.org/2000/svg"><g id="codedoc" transform="translate(-244.000000, -364.000000)" fill-rule="nonzero"><path d="M580,532 C615.346224,532 644,560.653776 644,596 C644,631.346224 615.346224,660 580,660 C544.653776,660 516,631.346224 516,596 C516,560.653776 544.653776,532 580,532 Z M716,532 C751.346224,532 780,560.653776 780,596 C780,631.346224 751.346224,660 716,660 L692,660 C687.581722,660 684,656.418278 684,652 C684,647.581722 687.581722,644 692,644 L716,644 C742.509668,644 764,622.509668 764,596 C764,569.490332 742.509668,548 716,548 L692,548 C687.581722,548 684,544.418278 684,540 C684,535.581722 687.581722,532 692,532 L716,532 Z M468,532 C472.418278,532 476,535.581722 476,540 L476,652 C476,656.418278 472.418278,660 468,660 L444,660 C408.653776,660 380,631.346224 380,596 C380,560.653776 408.653776,532 444,532 L468,532 Z M332,532 C336.418278,532 340,535.581722 340,540 L340,652 C340,656.418278 336.418278,660 332,660 L252,660 C247.581722,660 244,656.418278 244,652 L244,540 C244,535.581722 247.581722,532 252,532 L332,532 Z M580,548 C553.490332,548 532,569.490332 532,596 C532,622.509668 553.490332,644 580,644 C606.509668,644 628,622.509668 628,596 C628,569.490332 606.509668,548 580,548 Z M461,548 L444,548 C417.490332,548 396,569.490332 396,596 C396,622.509668 417.490332,644 444,644 L461,644 L461,548 Z M444,364 C479.346224,364 508,392.653776 508,428 C508,463.346224 479.346224,492 444,492 C408.653776,492 380,463.346224 380,428 C380,392.653776 408.653776,364 444,364 Z M332,364 C336.418278,364 340,367.581722 340,372 C340,376.418278 336.418278,380 332,380 L308,380 C281.490332,380 260,401.490332 260,428 C260,454.509668 281.490332,476 308,476 L332,476 C336.418278,476 340,479.581722 340,484 C340,488.418278 336.418278,492 332,492 L308,492 C272.653776,492 244,463.346224 244,428 C244,392.653776 272.653776,364 308,364 L332,364 Z M580,364 C615.346224,364 644,392.653776 644,428 C644,463.346224 615.346224,492 580,492 L556,492 C551.581722,492 548,488.418278 548,484 L548,372 C548,367.581722 551.581722,364 556,364 L580,364 Z M772,364 C776.418278,364 780,367.581722 780,372 C780,376.418278 776.418278,380 772,380 L700,380 L700,420 L772,420 C776.418278,420 780,423.581722 780,428 C780,432.418278 776.418278,436 772,436 L700,436 L700,476 L772,476 C776.418278,476 780,479.581722 780,484 C780,488.418278 776.418278,492 772,492 L692,492 C687.581722,492 684,488.418278 684,484 L684,372 C684,367.581722 687.581722,364 692,364 L772,364 Z M444,380 C417.490332,380 396,401.490332 396,428 C396,454.509668 417.490332,476 444,476 C470.509668,476 492,454.509668 492,428 C492,401.490332 470.509668,380 444,380 Z M580,380 L563,380 L563,476 L580,476 C606.509668,476 628,454.509668 628,428 C628,401.490332 606.509668,380 580,380 Z"></path></g></svg></a></div><div id="-codedoc-container" class="container"><h1 id="update" class="heading-0-0-1"><span class="anchor-0-0-2" data-ignore-text=""><span class="icon-font" data-ignore-text="" style="vertical-align: sub">link</span></span>Update</h1><p>Autorestic can update itself! Super handy right? Simply run autorestic update and we will check for you if there are updates for restic and autorestic and install them if necessary.</p><pre class=""><code class="bash code-0-0-3" tabindex="0"><span class="wmbar-0-0-6"><span></span><span></span><span></span><span></span></span><div class="line-0-0-5 " data-content="autorestic update"><span class="lineCounter-0-0-4 prim">1</span>autorestic update</div><br></code></pre><p>Updates both restic and autorestic automagically.</p><script id="KIjwgovngw">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("KIjwgovngw", "qcaKEY878Mn2dFQW/lSrDg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="contentnav-0-0-14" data-no-search=""><a href="#update" class="h1" data-content-highlight="update">Update</a></div></div><div id="-codedoc-toc" class="toc-0-0-11"><script>
|
||||
if (window.matchMedia('(min-width: 1200px)').matches) {
|
||||
if (!localStorage.getItem('-codedoc-toc-active')) {
|
||||
localStorage.setItem('-codedoc-toc-active', "true");
|
||||
}
|
||||
}
|
||||
</script><div class="content-0-0-12"><p><a href="/autorestic/">Home</a>
|
||||
<a href="/autorestic/quick">Quick Start</a>
|
||||
<a href="/autorestic/installation">Installation</a>
|
||||
<a href="/autorestic/config">Configuration</a></p><div class="collapse-0-0-7 "><script id="YsZKUPEfci">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("YsZKUPEfci", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">Locations</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/location/overview">Overview</a>
|
||||
<a href="/autorestic/location/hooks">Hooks</a>
|
||||
<a href="/autorestic/location/exclude">Excluding Files</a>
|
||||
<a href="/autorestic/location/forget">Forget Policy</a>
|
||||
<a href="/autorestic/location/cron">Cron</a>
|
||||
<a href="/autorestic/location/docker">Docker Volumes</a></p></div></div><div class="collapse-0-0-7 "><script id="UcRzCcsqfz">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("UcRzCcsqfz", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">Backend</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/backend/overview">Overview</a>
|
||||
<a href="/autorestic/backend/available">Available Backends</a></p></div></div><div class="collapse-0-0-7 "><script id="b_MbTmVkO_">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("b_MbTmVkO_", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">CLI</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/cli/info">Info</a>
|
||||
<a href="/autorestic/cli/check">Check</a>
|
||||
<a href="/autorestic/cli/backup">Backup</a>
|
||||
<a href="/autorestic/cli/restore">Restore</a>
|
||||
<a href="/autorestic/cli/forget">Forget</a>
|
||||
<a href="/autorestic/cli/cron">Cron</a>
|
||||
<a href="/autorestic/cli/exec">Exec</a>
|
||||
<a href="/autorestic/cli/install">Install</a>
|
||||
<a href="/autorestic/cli/uninstall">Uninstall</a>
|
||||
<a href="/autorestic/cli/update">Update</a></p></div></div><p><a href="/autorestic/examples">Examples</a></p><p><a href="/autorestic/qa">QA</a></p><p><a href="/autorestic/contrib">Contributors</a></p></div><div class="search-0-0-13"><script id="FtvtUkxLWB">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("FtvtUkxLWB", "+SrlfVhZ/PRQ5WhUlZbTaA==", {"repo":"autorestic","user":"cupcakearmy","root":"docs/md","pick":"\\.md$","drop":"(^_)|(\\/_)"});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div></div><div class="footer-0-0-10"><div class="left"><script id="ybii_tofbt">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("ybii_tofbt", "XsNW3ht5ee+RmVUActEo9g==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div><div class="main"><div class="inside"><a href="https://github.com/cupcakearmy/autorestic/" target="_blank">GitHub</a></div></div><div class="right"><script id="hnXhZfddbi">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("hnXhZfddbi", "Y1WWvCKxkgk1yh8xbCfXqw==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div></div><script id="lpzq_pSjFw">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("lpzq_pSjFw", "v641FmLj+AeGp0uuFTI6ug==", {"namespace":"/autorestic"});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></body></html>
|
62
docs/config.html
Normal file
62
docs/config.html
Normal file
File diff suppressed because one or more lines are too long
62
docs/contrib.html
Normal file
62
docs/contrib.html
Normal file
@@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html><html><head><title>Autorestic | 🙋♀️🙋♂️ Contributors</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"><meta name="robots" content="index,follow"><meta name="theme-color" content="#212121"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"><link href="https://fonts.googleapis.com/css?family=Hind:400,700&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:300,400&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined" rel="stylesheet"><style>
|
||||
body, input, button {
|
||||
font-family: 'Hind', sans-serif;
|
||||
}
|
||||
|
||||
code, .hljs {
|
||||
font-family: 'Source Code Pro', 'Courier New', Courier, monospace;
|
||||
}
|
||||
|
||||
.icon-font {
|
||||
font-family: 'Material Icons';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px; /* Preferred icon size */
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: nowrap;
|
||||
direction: ltr;
|
||||
|
||||
/* Support for all WebKit browsers. */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
/* Support for Safari and Chrome. */
|
||||
text-rendering: optimizeLegibility;
|
||||
|
||||
/* Support for Firefox. */
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Support for IE. */
|
||||
font-feature-settings: 'liga';
|
||||
}
|
||||
|
||||
.icon-font.outline {
|
||||
font-family: 'Material Icons Outlined';
|
||||
}
|
||||
</style><link href="/autorestic/./dist/codedoc-styles.css" rel="stylesheet"><script async="" defer="" src="/autorestic/./dist/codedoc-bundle.js"></script></head><body><div class="header-0-0-9"><script async="" defer="" src="https://buttons.github.io/buttons.js"></script><a class="github-button" data-color-scheme="no-preference: light; light: light; dark: dark;" data-icon="false" data-show-count="true" data-size="false" href="https://github.com/cupcakearmy/autorestic/">Star</a><br><br><a class="watermark-0-0-8" href="https://github.com/CONNECT-platform/codedoc" target="_blank">Created With<svg viewBox="0 0 536 296" version="1.1" xmlns="http://www.w3.org/2000/svg"><g id="codedoc" transform="translate(-244.000000, -364.000000)" fill-rule="nonzero"><path d="M580,532 C615.346224,532 644,560.653776 644,596 C644,631.346224 615.346224,660 580,660 C544.653776,660 516,631.346224 516,596 C516,560.653776 544.653776,532 580,532 Z M716,532 C751.346224,532 780,560.653776 780,596 C780,631.346224 751.346224,660 716,660 L692,660 C687.581722,660 684,656.418278 684,652 C684,647.581722 687.581722,644 692,644 L716,644 C742.509668,644 764,622.509668 764,596 C764,569.490332 742.509668,548 716,548 L692,548 C687.581722,548 684,544.418278 684,540 C684,535.581722 687.581722,532 692,532 L716,532 Z M468,532 C472.418278,532 476,535.581722 476,540 L476,652 C476,656.418278 472.418278,660 468,660 L444,660 C408.653776,660 380,631.346224 380,596 C380,560.653776 408.653776,532 444,532 L468,532 Z M332,532 C336.418278,532 340,535.581722 340,540 L340,652 C340,656.418278 336.418278,660 332,660 L252,660 C247.581722,660 244,656.418278 244,652 L244,540 C244,535.581722 247.581722,532 252,532 L332,532 Z M580,548 C553.490332,548 532,569.490332 532,596 C532,622.509668 553.490332,644 580,644 C606.509668,644 628,622.509668 628,596 C628,569.490332 606.509668,548 580,548 Z M461,548 L444,548 C417.490332,548 396,569.490332 396,596 C396,622.509668 417.490332,644 444,644 L461,644 L461,548 Z M444,364 C479.346224,364 508,392.653776 508,428 C508,463.346224 479.346224,492 444,492 C408.653776,492 380,463.346224 380,428 C380,392.653776 408.653776,364 444,364 Z M332,364 C336.418278,364 340,367.581722 340,372 C340,376.418278 336.418278,380 332,380 L308,380 C281.490332,380 260,401.490332 260,428 C260,454.509668 281.490332,476 308,476 L332,476 C336.418278,476 340,479.581722 340,484 C340,488.418278 336.418278,492 332,492 L308,492 C272.653776,492 244,463.346224 244,428 C244,392.653776 272.653776,364 308,364 L332,364 Z M580,364 C615.346224,364 644,392.653776 644,428 C644,463.346224 615.346224,492 580,492 L556,492 C551.581722,492 548,488.418278 548,484 L548,372 C548,367.581722 551.581722,364 556,364 L580,364 Z M772,364 C776.418278,364 780,367.581722 780,372 C780,376.418278 776.418278,380 772,380 L700,380 L700,420 L772,420 C776.418278,420 780,423.581722 780,428 C780,432.418278 776.418278,436 772,436 L700,436 L700,476 L772,476 C776.418278,476 780,479.581722 780,484 C780,488.418278 776.418278,492 772,492 L692,492 C687.581722,492 684,488.418278 684,484 L684,372 C684,367.581722 687.581722,364 692,364 L772,364 Z M444,380 C417.490332,380 396,401.490332 396,428 C396,454.509668 417.490332,476 444,476 C470.509668,476 492,454.509668 492,428 C492,401.490332 470.509668,380 444,380 Z M580,380 L563,380 L563,476 L580,476 C606.509668,476 628,454.509668 628,428 C628,401.490332 606.509668,380 580,380 Z"></path></g></svg></a></div><div id="-codedoc-container" class="container"><h1 id="🙋♀️🙋♂️-contributors" class="heading-0-0-1"><span class="anchor-0-0-2" data-ignore-text=""><span class="icon-font" data-ignore-text="" style="vertical-align: sub">link</span></span>🙋♀️🙋♂️ Contributors</h1><p>This amazing people helped the project!</p><ul><li>@ChanceM [Docs]</li><li>@EliotBerriot [Docs, Pruning, S3]</li></ul><script id="gysNABPbrX">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("gysNABPbrX", "qcaKEY878Mn2dFQW/lSrDg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="contentnav-0-0-14" data-no-search=""><a href="#🙋♀️🙋♂️-contributors" class="h1" data-content-highlight="🙋♀️🙋♂️-contributors">🙋♀️🙋♂️ Contributors</a></div></div><div id="-codedoc-toc" class="toc-0-0-11"><script>
|
||||
if (window.matchMedia('(min-width: 1200px)').matches) {
|
||||
if (!localStorage.getItem('-codedoc-toc-active')) {
|
||||
localStorage.setItem('-codedoc-toc-active', "true");
|
||||
}
|
||||
}
|
||||
</script><div class="content-0-0-12"><p><a href="/autorestic/">Home</a>
|
||||
<a href="/autorestic/quick">Quick Start</a>
|
||||
<a href="/autorestic/installation">Installation</a>
|
||||
<a href="/autorestic/config">Configuration</a></p><div class="collapse-0-0-7 "><script id="MPLpfLMJjX">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("MPLpfLMJjX", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">Locations</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/location/overview">Overview</a>
|
||||
<a href="/autorestic/location/hooks">Hooks</a>
|
||||
<a href="/autorestic/location/exclude">Excluding Files</a>
|
||||
<a href="/autorestic/location/forget">Forget Policy</a>
|
||||
<a href="/autorestic/location/cron">Cron</a>
|
||||
<a href="/autorestic/location/docker">Docker Volumes</a></p></div></div><div class="collapse-0-0-7 "><script id="_IisYAmKrq">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("_IisYAmKrq", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">Backend</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/backend/overview">Overview</a>
|
||||
<a href="/autorestic/backend/available">Available Backends</a></p></div></div><div class="collapse-0-0-7 "><script id="EZnoxPSbAJ">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("EZnoxPSbAJ", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">CLI</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/cli/info">Info</a>
|
||||
<a href="/autorestic/cli/check">Check</a>
|
||||
<a href="/autorestic/cli/backup">Backup</a>
|
||||
<a href="/autorestic/cli/restore">Restore</a>
|
||||
<a href="/autorestic/cli/forget">Forget</a>
|
||||
<a href="/autorestic/cli/cron">Cron</a>
|
||||
<a href="/autorestic/cli/exec">Exec</a>
|
||||
<a href="/autorestic/cli/install">Install</a>
|
||||
<a href="/autorestic/cli/uninstall">Uninstall</a>
|
||||
<a href="/autorestic/cli/update">Update</a></p></div></div><p><a href="/autorestic/examples">Examples</a></p><p><a href="/autorestic/qa">QA</a></p><p><a href="/autorestic/contrib">Contributors</a></p></div><div class="search-0-0-13"><script id="xhHOFZLHy_">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("xhHOFZLHy_", "+SrlfVhZ/PRQ5WhUlZbTaA==", {"repo":"autorestic","user":"cupcakearmy","root":"docs/md","pick":"\\.md$","drop":"(^_)|(\\/_)"});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div></div><div class="footer-0-0-10"><div class="left"><script id="uNhkYGNJlc">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("uNhkYGNJlc", "XsNW3ht5ee+RmVUActEo9g==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div><div class="main"><div class="inside"><a href="https://github.com/cupcakearmy/autorestic/" target="_blank">GitHub</a></div></div><div class="right"><script id="rRtVzSvejo">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("rRtVzSvejo", "Y1WWvCKxkgk1yh8xbCfXqw==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div></div><script id="knFFH_iRrW">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("knFFH_iRrW", "v641FmLj+AeGp0uuFTI6ug==", {"namespace":"/autorestic"});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></body></html>
|
40
docs/dist/codedoc-bundle.entry.js
vendored
Normal file
40
docs/dist/codedoc-bundle.entry.js
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
import { getRenderer } from '/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/transport/renderer.js';
|
||||
import { initJssCs } from '/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/transport/setup-jss.js';initJssCs();
|
||||
import { installTheme } from '/Users/nicco/Documents/git/autorestic/.codedoc/content/theme.ts';installTheme();
|
||||
import { codeSelection } from '/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/code/selection.js';codeSelection();
|
||||
import { sameLineLengthInCodes } from '/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/code/same-line-length.js';sameLineLengthInCodes();
|
||||
import { initHintBox } from '/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/code/line-hint/index.js';initHintBox();
|
||||
import { initCodeLineRef } from '/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/code/line-ref/index.js';initCodeLineRef();
|
||||
import { initSmartCopy } from '/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/code/smart-copy.js';initSmartCopy();
|
||||
import { copyHeadings } from '/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/heading/copy-headings.js';copyHeadings();
|
||||
import { contentNavHighlight } from '/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/page/contentnav/highlight.js';contentNavHighlight();
|
||||
import { loadDeferredIFrames } from '/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/transport/deferred-iframe.js';loadDeferredIFrames();
|
||||
import { smoothLoading } from '/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/transport/smooth-loading.js';smoothLoading();
|
||||
import { tocHighlight } from '/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/page/toc/toc-highlight.js';tocHighlight();
|
||||
import { postNavSearch } from '/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/page/toc/search/post-nav/index.js';postNavSearch();
|
||||
import { ToCPrevNext } from '/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/page/toc/prevnext/index.js';
|
||||
import { CollapseControl } from '/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/collapse/collapse-control.js';
|
||||
import { GithubSearch } from '/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/misc/github/search.js';
|
||||
import { ToCToggle } from '/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/page/toc/toggle/index.js';
|
||||
import { DarkModeSwitch } from '/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/darkmode/index.js';
|
||||
import { ConfigTransport } from '/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/transport/config.js';
|
||||
|
||||
const components = {
|
||||
'qcaKEY878Mn2dFQW/lSrDg==': ToCPrevNext,
|
||||
'fz894w7KG2/tX4kLbbA1Kg==': CollapseControl,
|
||||
'+SrlfVhZ/PRQ5WhUlZbTaA==': GithubSearch,
|
||||
'XsNW3ht5ee+RmVUActEo9g==': ToCToggle,
|
||||
'Y1WWvCKxkgk1yh8xbCfXqw==': DarkModeSwitch,
|
||||
'v641FmLj+AeGp0uuFTI6ug==': ConfigTransport
|
||||
};
|
||||
|
||||
const renderer = getRenderer();
|
||||
const ogtransport = window.__sdh_transport;
|
||||
window.__sdh_transport = function(id, hash, props) {
|
||||
if (hash in components) {
|
||||
const target = document.getElementById(id);
|
||||
renderer.render(renderer.create(components[hash], props)).after(target);
|
||||
target.remove();
|
||||
}
|
||||
else if (ogtransport) ogtransport(id, hash, props);
|
||||
}
|
32
docs/dist/codedoc-bundle.js
vendored
Normal file
32
docs/dist/codedoc-bundle.js
vendored
Normal file
File diff suppressed because one or more lines are too long
106
docs/dist/codedoc-bundle.meta.json
vendored
Normal file
106
docs/dist/codedoc-bundle.meta.json
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
{
|
||||
"init": [
|
||||
{
|
||||
"name": "initJssCs",
|
||||
"filename": "/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/transport/setup-jss.js",
|
||||
"hash": "c/OJpUDX26Qm4IbMYtLbjg=="
|
||||
},
|
||||
{
|
||||
"name": "installTheme",
|
||||
"filename": "/Users/nicco/Documents/git/autorestic/.codedoc/content/theme.ts",
|
||||
"hash": "obU6UstdkSAvgbysOh3/eg=="
|
||||
},
|
||||
{
|
||||
"name": "codeSelection",
|
||||
"filename": "/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/code/selection.js",
|
||||
"hash": "4VXGhMNJRz8Eyjdvm6ntYg=="
|
||||
},
|
||||
{
|
||||
"name": "sameLineLengthInCodes",
|
||||
"filename": "/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/code/same-line-length.js",
|
||||
"hash": "nEpV43sODVDt+zjIO7H9+A=="
|
||||
},
|
||||
{
|
||||
"name": "initHintBox",
|
||||
"filename": "/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/code/line-hint/index.js",
|
||||
"hash": "9M6+/niHbbHMYKbOF0DTzg=="
|
||||
},
|
||||
{
|
||||
"name": "initCodeLineRef",
|
||||
"filename": "/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/code/line-ref/index.js",
|
||||
"hash": "rPwNL8eX+bbHwAgvTQ8Iag=="
|
||||
},
|
||||
{
|
||||
"name": "initSmartCopy",
|
||||
"filename": "/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/code/smart-copy.js",
|
||||
"hash": "xFnLgdNzBUv9BdaGDgvJDA=="
|
||||
},
|
||||
{
|
||||
"name": "copyHeadings",
|
||||
"filename": "/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/heading/copy-headings.js",
|
||||
"hash": "i1yTTWSH2AaFOCy2yKgs0Q=="
|
||||
},
|
||||
{
|
||||
"name": "contentNavHighlight",
|
||||
"filename": "/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/page/contentnav/highlight.js",
|
||||
"hash": "SpIa+6Gg/KMV7Wb4QvBzcg=="
|
||||
},
|
||||
{
|
||||
"name": "loadDeferredIFrames",
|
||||
"filename": "/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/transport/deferred-iframe.js",
|
||||
"hash": "naHAbpxvOw4i/sUpn2LnRQ=="
|
||||
},
|
||||
{
|
||||
"name": "smoothLoading",
|
||||
"filename": "/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/transport/smooth-loading.js",
|
||||
"hash": "vXAT5HUat2IZoc8ZEN/OKA=="
|
||||
},
|
||||
{
|
||||
"name": "tocHighlight",
|
||||
"filename": "/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/page/toc/toc-highlight.js",
|
||||
"hash": "suB+mCUXKx/0sad/yURMug=="
|
||||
},
|
||||
{
|
||||
"name": "postNavSearch",
|
||||
"filename": "/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/page/toc/search/post-nav/index.js",
|
||||
"hash": "/izvKWQZGCWZbwwWyiivfw=="
|
||||
}
|
||||
],
|
||||
"components": [
|
||||
{
|
||||
"name": "ToCPrevNext",
|
||||
"filename": "/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/page/toc/prevnext/index.js",
|
||||
"hash": "qcaKEY878Mn2dFQW/lSrDg=="
|
||||
},
|
||||
{
|
||||
"name": "CollapseControl",
|
||||
"filename": "/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/collapse/collapse-control.js",
|
||||
"hash": "fz894w7KG2/tX4kLbbA1Kg=="
|
||||
},
|
||||
{
|
||||
"name": "GithubSearch",
|
||||
"filename": "/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/misc/github/search.js",
|
||||
"hash": "+SrlfVhZ/PRQ5WhUlZbTaA=="
|
||||
},
|
||||
{
|
||||
"name": "ToCToggle",
|
||||
"filename": "/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/page/toc/toggle/index.js",
|
||||
"hash": "XsNW3ht5ee+RmVUActEo9g=="
|
||||
},
|
||||
{
|
||||
"name": "DarkModeSwitch",
|
||||
"filename": "/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/components/darkmode/index.js",
|
||||
"hash": "Y1WWvCKxkgk1yh8xbCfXqw=="
|
||||
},
|
||||
{
|
||||
"name": "ConfigTransport",
|
||||
"filename": "/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/transport/config.js",
|
||||
"hash": "v641FmLj+AeGp0uuFTI6ug=="
|
||||
}
|
||||
],
|
||||
"renderer": {
|
||||
"name": "getRenderer",
|
||||
"filename": "/Users/nicco/Documents/git/autorestic/.codedoc/node_modules/@codedoc/core/dist/es6/transport/renderer.js",
|
||||
"hash": "DuikI/Y5reNcodaSzsxs0w=="
|
||||
}
|
||||
}
|
871
docs/dist/codedoc-styles.css
vendored
Normal file
871
docs/dist/codedoc-styles.css
vendored
Normal file
@@ -0,0 +1,871 @@
|
||||
.heading-0-0-1 {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
}
|
||||
.anchor-0-0-2 {
|
||||
top: 0;
|
||||
left: -32px;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
transform: translateX(-8px);
|
||||
transition: opacity .1s, transform .1s;
|
||||
align-items: center;
|
||||
padding-right: 8px;
|
||||
}
|
||||
.heading-0-0-1:hover .anchor-0-0-2 {
|
||||
opacity: 0.5;
|
||||
transform: none;
|
||||
}
|
||||
.heading-0-0-1:hover .anchor-0-0-2:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
.code-0-0-3 {
|
||||
color: #e0e0e0;
|
||||
display: block;
|
||||
outline: none;
|
||||
padding: 24px 0;
|
||||
position: relative;
|
||||
font-size: 13px;
|
||||
background: #212121;
|
||||
box-shadow: 0 6px 12px rgba(0, 0, 0, .25);
|
||||
overflow-x: auto;
|
||||
user-select: none;
|
||||
border-radius: 3px;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
pre.with-bar .code-0-0-3 {
|
||||
padding-top: 0;
|
||||
}
|
||||
.code-0-0-3 .token.keyword {
|
||||
color: #7187ff;
|
||||
}
|
||||
.code-0-0-3 .token.string {
|
||||
color: #69f0ae;
|
||||
}
|
||||
.code-0-0-3 .token.number {
|
||||
color: #ffc400;
|
||||
}
|
||||
.code-0-0-3 .token.boolean {
|
||||
color: #ffc400;
|
||||
}
|
||||
.code-0-0-3 .token.operator {
|
||||
color: #18ffff;
|
||||
}
|
||||
.code-0-0-3 .token.function {
|
||||
color: #e0e0e0;
|
||||
}
|
||||
.code-0-0-3 .token.parameter {
|
||||
color: #e0e0e0;
|
||||
}
|
||||
.code-0-0-3 .token.comment {
|
||||
color: #757575;
|
||||
}
|
||||
.code-0-0-3 .token.tag {
|
||||
color: #ffa372;
|
||||
}
|
||||
.code-0-0-3 .token.builtin {
|
||||
color: #e0e0e0;
|
||||
}
|
||||
.code-0-0-3 .token.punctuation {
|
||||
color: #fcf7bb;
|
||||
}
|
||||
.code-0-0-3 .token.class-name {
|
||||
color: #e0e0e0;
|
||||
}
|
||||
.code-0-0-3 .token.attr-name {
|
||||
color: #f6d186;
|
||||
}
|
||||
.code-0-0-3 .token.attr-value {
|
||||
color: #69f0ae;
|
||||
}
|
||||
.code-0-0-3 .token.plain-text {
|
||||
color: #bdbdbd;
|
||||
}
|
||||
.code-0-0-3 .token.script {
|
||||
color: #e0e0e0;
|
||||
}
|
||||
.code-0-0-3 .token.placeholder {
|
||||
color: #18ffff;
|
||||
}
|
||||
.code-0-0-3 .token.selector {
|
||||
color: #ffa372;
|
||||
}
|
||||
.code-0-0-3 .token.property {
|
||||
color: #f6d186;
|
||||
}
|
||||
.code-0-0-3 .token.important {
|
||||
color: #be79df;
|
||||
}
|
||||
.code-0-0-3.scss .token.function, .code-0-0-3.css .token.function, .code-0-0-3.sass .token.function {
|
||||
color: #9aceff;
|
||||
}
|
||||
.code-0-0-3 .token.key {
|
||||
color: #f6d186;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not(.dark-mode-animate) .code-0-0-3 {
|
||||
color: #e0e0e0;
|
||||
background: #000000;
|
||||
box-shadow: 0 6px 12px #121212;
|
||||
}
|
||||
body:not(.dark-mode-animate) .code-0-0-3 .token.keyword {
|
||||
color: #7187ff;
|
||||
}
|
||||
body:not(.dark-mode-animate) .code-0-0-3 .token.string {
|
||||
color: #69f0ae;
|
||||
}
|
||||
body:not(.dark-mode-animate) .code-0-0-3 .token.number {
|
||||
color: #ffc400;
|
||||
}
|
||||
body:not(.dark-mode-animate) .code-0-0-3 .token.boolean {
|
||||
color: #ffc400;
|
||||
}
|
||||
body:not(.dark-mode-animate) .code-0-0-3 .token.operator {
|
||||
color: #18ffff;
|
||||
}
|
||||
body:not(.dark-mode-animate) .code-0-0-3 .token.function {
|
||||
color: #e0e0e0;
|
||||
}
|
||||
body:not(.dark-mode-animate) .code-0-0-3 .token.parameter {
|
||||
color: #e0e0e0;
|
||||
}
|
||||
body:not(.dark-mode-animate) .code-0-0-3 .token.comment {
|
||||
color: #757575;
|
||||
}
|
||||
body:not(.dark-mode-animate) .code-0-0-3 .token.tag {
|
||||
color: #ffa372;
|
||||
}
|
||||
body:not(.dark-mode-animate) .code-0-0-3 .token.builtin {
|
||||
color: #e0e0e0;
|
||||
}
|
||||
body:not(.dark-mode-animate) .code-0-0-3 .token.punctuation {
|
||||
color: #fcf7bb;
|
||||
}
|
||||
body:not(.dark-mode-animate) .code-0-0-3 .token.class-name {
|
||||
color: #e0e0e0;
|
||||
}
|
||||
body:not(.dark-mode-animate) .code-0-0-3 .token.attr-name {
|
||||
color: #f6d186;
|
||||
}
|
||||
body:not(.dark-mode-animate) .code-0-0-3 .token.attr-value {
|
||||
color: #69f0ae;
|
||||
}
|
||||
body:not(.dark-mode-animate) .code-0-0-3 .token.plain-text {
|
||||
color: #bdbdbd;
|
||||
}
|
||||
body:not(.dark-mode-animate) .code-0-0-3 .token.script {
|
||||
color: #e0e0e0;
|
||||
}
|
||||
body:not(.dark-mode-animate) .code-0-0-3 .token.placeholder {
|
||||
color: #18ffff;
|
||||
}
|
||||
body:not(.dark-mode-animate) .code-0-0-3 .token.selector {
|
||||
color: #ffa372;
|
||||
}
|
||||
body:not(.dark-mode-animate) .code-0-0-3 .token.property {
|
||||
color: #f6d186;
|
||||
}
|
||||
body:not(.dark-mode-animate) .code-0-0-3 .token.important {
|
||||
color: #be79df;
|
||||
}
|
||||
body:not(.dark-mode-animate) .code-0-0-3.scss .token.function, body:not(.dark-mode-animate) .code-0-0-3.css .token.function, body:not(.dark-mode-animate) .code-0-0-3.sass .token.function {
|
||||
color: #9aceff;
|
||||
}
|
||||
body:not(.dark-mode-animate) .code-0-0-3 .token.key {
|
||||
color: #f6d186;
|
||||
}
|
||||
}
|
||||
body.dark .code-0-0-3 {
|
||||
color: #e0e0e0;
|
||||
background: #000000;
|
||||
box-shadow: 0 6px 12px #121212;
|
||||
}
|
||||
body.dark .code-0-0-3 .token.keyword {
|
||||
color: #7187ff;
|
||||
}
|
||||
body.dark .code-0-0-3 .token.string {
|
||||
color: #69f0ae;
|
||||
}
|
||||
body.dark .code-0-0-3 .token.number {
|
||||
color: #ffc400;
|
||||
}
|
||||
body.dark .code-0-0-3 .token.boolean {
|
||||
color: #ffc400;
|
||||
}
|
||||
body.dark .code-0-0-3 .token.operator {
|
||||
color: #18ffff;
|
||||
}
|
||||
body.dark .code-0-0-3 .token.function {
|
||||
color: #e0e0e0;
|
||||
}
|
||||
body.dark .code-0-0-3 .token.parameter {
|
||||
color: #e0e0e0;
|
||||
}
|
||||
body.dark .code-0-0-3 .token.comment {
|
||||
color: #757575;
|
||||
}
|
||||
body.dark .code-0-0-3 .token.tag {
|
||||
color: #ffa372;
|
||||
}
|
||||
body.dark .code-0-0-3 .token.builtin {
|
||||
color: #e0e0e0;
|
||||
}
|
||||
body.dark .code-0-0-3 .token.punctuation {
|
||||
color: #fcf7bb;
|
||||
}
|
||||
body.dark .code-0-0-3 .token.class-name {
|
||||
color: #e0e0e0;
|
||||
}
|
||||
body.dark .code-0-0-3 .token.attr-name {
|
||||
color: #f6d186;
|
||||
}
|
||||
body.dark .code-0-0-3 .token.attr-value {
|
||||
color: #69f0ae;
|
||||
}
|
||||
body.dark .code-0-0-3 .token.plain-text {
|
||||
color: #bdbdbd;
|
||||
}
|
||||
body.dark .code-0-0-3 .token.script {
|
||||
color: #e0e0e0;
|
||||
}
|
||||
body.dark .code-0-0-3 .token.placeholder {
|
||||
color: #18ffff;
|
||||
}
|
||||
body.dark .code-0-0-3 .token.selector {
|
||||
color: #ffa372;
|
||||
}
|
||||
body.dark .code-0-0-3 .token.property {
|
||||
color: #f6d186;
|
||||
}
|
||||
body.dark .code-0-0-3 .token.important {
|
||||
color: #be79df;
|
||||
}
|
||||
body.dark .code-0-0-3.scss .token.function, body.dark .code-0-0-3.css .token.function, body.dark .code-0-0-3.sass .token.function {
|
||||
color: #9aceff;
|
||||
}
|
||||
body.dark .code-0-0-3 .token.key {
|
||||
color: #f6d186;
|
||||
}
|
||||
.lineCounter-0-0-4 {
|
||||
left: 0;
|
||||
color: transparent;
|
||||
width: 24px;
|
||||
height: 1.25rem;
|
||||
display: inline-flex;
|
||||
position: sticky;
|
||||
font-size: 10px;
|
||||
background: #212121;
|
||||
align-items: center;
|
||||
border-right: 2px solid rgba(255, 255, 255, .015);
|
||||
margin-right: 12px;
|
||||
padding-right: 12px;
|
||||
flex-direction: row-reverse;
|
||||
vertical-align: top;
|
||||
}
|
||||
.lineCounter-0-0-4.prim {
|
||||
color: #616161;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not(.dark-mode-animate) .lineCounter-0-0-4 {
|
||||
background: #000000;
|
||||
border-color: rgba(255, 255, 255, .015);
|
||||
}
|
||||
body:not(.dark-mode-animate) .lineCounter-0-0-4.prim {
|
||||
color: #616161;
|
||||
}
|
||||
}
|
||||
body.dark .lineCounter-0-0-4 {
|
||||
background: #000000;
|
||||
border-color: rgba(255, 255, 255, .015);
|
||||
}
|
||||
body.dark .lineCounter-0-0-4.prim {
|
||||
color: #616161;
|
||||
}
|
||||
.line-0-0-5 {
|
||||
cursor: pointer;
|
||||
height: 1.25rem;
|
||||
display: inline-block;
|
||||
min-width: 100%;
|
||||
background: transparent;
|
||||
transition: opacity .15s;
|
||||
}
|
||||
.has-selection .line-0-0-5:not(.selected) {
|
||||
opacity: 0.35;
|
||||
transition: opacity 3s;
|
||||
}
|
||||
.line-0-0-5.highlight {
|
||||
color: #ffffff;
|
||||
background: rgb(40, 46, 73);
|
||||
}
|
||||
.line-0-0-5.selected .lineCounter-0-0-4 {
|
||||
border-color: #7187ff !important;
|
||||
}
|
||||
.line-0-0-5:hover, .line-0-0-5.selected {
|
||||
background: #3b3b3b;
|
||||
}
|
||||
.line-0-0-5:hover .lineCounter-0-0-4 {
|
||||
border-color: rgba(255, 255, 255, .1);
|
||||
}
|
||||
body.dark .line-0-0-5:hover .lineCounter-0-0-4 {
|
||||
border-color: rgba(255, 255, 255, .1);
|
||||
}
|
||||
.line-0-0-5:hover .lineCounter-0-0-4, .line-0-0-5.selected .lineCounter-0-0-4 {
|
||||
color: #7187ff;
|
||||
background: #3b3b3b !important;
|
||||
}
|
||||
body.dark .line-0-0-5:hover, body.dark .line-0-0-5.selected {
|
||||
background: #1a1a1a !important;
|
||||
}
|
||||
body.dark .line-0-0-5:hover .lineCounter-0-0-4, body.dark .line-0-0-5.selected .lineCounter-0-0-4 {
|
||||
color: #7187ff;
|
||||
background: #1a1a1a !important;
|
||||
}
|
||||
body.dark .line-0-0-5.selected .lineCounter-0-0-4 {
|
||||
border-color: #7187ff !important;
|
||||
}
|
||||
.line-0-0-5.highlight .lineCounter-0-0-4 {
|
||||
background: rgb(40, 46, 73);
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not(.dark-mode-animate) .line-0-0-5.highlight {
|
||||
color: #ffffff;
|
||||
background: rgb(28, 29, 48);
|
||||
}
|
||||
body:not(.dark-mode-animate) .line-0-0-5.highlight .lineCounter-0-0-4 {
|
||||
background: rgb(28, 29, 48);
|
||||
}
|
||||
}
|
||||
body.dark .line-0-0-5.highlight {
|
||||
color: #ffffff;
|
||||
background: rgb(28, 29, 48);
|
||||
}
|
||||
body.dark .line-0-0-5.highlight .lineCounter-0-0-4 {
|
||||
background: rgb(28, 29, 48);
|
||||
}
|
||||
.wmbar-0-0-6 {
|
||||
left: 0;
|
||||
display: none;
|
||||
padding: 16px;
|
||||
position: sticky;
|
||||
}
|
||||
.wmbar-0-0-6>span {
|
||||
display: block;
|
||||
opacity: 0.5;
|
||||
flex-grow: 1;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
font-family: sans-serif;
|
||||
margin-right: 64px;
|
||||
}
|
||||
.wmbar-0-0-6>span:first-child, .wmbar-0-0-6>span:nth-child(2), .wmbar-0-0-6>span:nth-child(3) {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
opacity: 1;
|
||||
flex-grow: 0;
|
||||
margin-right: 8px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
pre.with-bar .wmbar-0-0-6 {
|
||||
display: flex;
|
||||
}
|
||||
.wmbar-0-0-6>span:first-child:first-child, .wmbar-0-0-6>span:nth-child(2):first-child, .wmbar-0-0-6>span:nth-child(3):first-child {
|
||||
background: rgb(255, 95, 86);
|
||||
}
|
||||
.wmbar-0-0-6>span:first-child:nth-child(2), .wmbar-0-0-6>span:nth-child(2):nth-child(2), .wmbar-0-0-6>span:nth-child(3):nth-child(2) {
|
||||
background: rgb(255, 189, 46);
|
||||
}
|
||||
.wmbar-0-0-6>span:first-child:nth-child(3), .wmbar-0-0-6>span:nth-child(2):nth-child(3), .wmbar-0-0-6>span:nth-child(3):nth-child(3) {
|
||||
background: rgb(39, 201, 63);
|
||||
}
|
||||
.collapse-0-0-7>.label {
|
||||
cursor: pointer;
|
||||
margin: 8px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
user-select: none;
|
||||
}
|
||||
.collapse-0-0-7>.content {
|
||||
opacity: 0;
|
||||
max-height: 0;
|
||||
transition: opacity .3s;
|
||||
visibility: hidden;
|
||||
border-left: 2px solid rgba(224, 224, 224, 0.5);
|
||||
padding-left: 16px;
|
||||
}
|
||||
.collapse-0-0-7.open>.content {
|
||||
opacity: 1;
|
||||
max-height: none;
|
||||
visibility: visible;
|
||||
}
|
||||
.collapse-0-0-7.open>.label .icon-font {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
body.dark-mode-animate .collapse-0-0-7>.content {
|
||||
transition: transform .15s, opacity .15s, border-color .3s;
|
||||
}
|
||||
body.dark .collapse-0-0-7>.content {
|
||||
border-color: rgba(49, 49, 49, 0.5);
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not(.dark-mode-animate) .collapse-0-0-7>.content {
|
||||
border-color: rgba(49, 49, 49, 0.5);
|
||||
}
|
||||
}
|
||||
.collapse-0-0-7>.label .text {
|
||||
flex-grow: 1;
|
||||
}
|
||||
.collapse-0-0-7>.label .icon-font {
|
||||
margin-right: 32px;
|
||||
}
|
||||
.collapse-0-0-7>.label:hover {
|
||||
color: #1eb2a6;
|
||||
transition: color .15s;
|
||||
}
|
||||
body.dark .collapse-0-0-7>.label:hover {
|
||||
color: #1eb2a6;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not(.dark-mode-animate) .collapse-0-0-7>.label:hover {
|
||||
color: #1eb2a6;
|
||||
}
|
||||
}
|
||||
body.dark-mode-animate .collapse-0-0-7>.label .icon-font {
|
||||
transition: transform .15s;
|
||||
}
|
||||
.watermark-0-0-8 {
|
||||
color: #424242;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
opacity: 0.2;
|
||||
font-size: 8px;
|
||||
transition: opacity .15s;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
body.dark-mode-animate .watermark-0-0-8 {
|
||||
transition: opacity .15s, color .3s;
|
||||
}
|
||||
.watermark-0-0-8:hover {
|
||||
opacity: 1;
|
||||
text-decoration: none;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not(.dark-mode-animate) .watermark-0-0-8 {
|
||||
color: #eeeeee;
|
||||
}
|
||||
}
|
||||
body.dark .watermark-0-0-8 {
|
||||
color: #eeeeee;
|
||||
}
|
||||
.watermark-0-0-8 svg {
|
||||
width: 2.8rem;
|
||||
display: block;
|
||||
margin-top: .25rem;
|
||||
}
|
||||
.watermark-0-0-8 svg g {
|
||||
fill: #424242;
|
||||
}
|
||||
body.dark-mode-animate .watermark-0-0-8 svg g {
|
||||
transition: fill .3s;
|
||||
}
|
||||
body.dark .watermark-0-0-8 svg g {
|
||||
fill: #eeeeee;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not(.dark-mode-animate) .watermark-0-0-8 svg g {
|
||||
fill: #eeeeee;
|
||||
}
|
||||
}
|
||||
.header-0-0-9 {
|
||||
top: 0;
|
||||
right: 0;
|
||||
padding: 32px;
|
||||
z-index: 100;
|
||||
position: fixed;
|
||||
text-align: right;
|
||||
}
|
||||
.footer-0-0-10 {
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: 64px;
|
||||
display: flex;
|
||||
z-index: 102;
|
||||
position: fixed;
|
||||
background: rgba(245, 245, 245, 0.85);
|
||||
box-shadow: 0 -2px 6px rgba(0, 0, 0, .03);
|
||||
align-items: center;
|
||||
backdrop-filter: blur(12px);
|
||||
justify-content: center;
|
||||
-webkit-backdrop-filter: blur(12px);
|
||||
}
|
||||
body.dark-mode-animate .footer-0-0-10 {
|
||||
transition: background .3s;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not(.dark-mode-animate) .footer-0-0-10 {
|
||||
background: rgba(33, 33, 33, 0.85);
|
||||
}
|
||||
}
|
||||
body.dark .footer-0-0-10 {
|
||||
background: rgba(33, 33, 33, 0.85);
|
||||
}
|
||||
.footer-0-0-10 .main {
|
||||
overflow: hidden;
|
||||
flex-grow: 1;
|
||||
text-align: center;
|
||||
}
|
||||
.footer-0-0-10 .left {
|
||||
padding-left: 32px;
|
||||
}
|
||||
.footer-0-0-10 .right {
|
||||
padding-right: 32px;
|
||||
}
|
||||
@media screen and (max-width: 800px) {
|
||||
.footer-0-0-10 .left {
|
||||
padding-left: 16px;
|
||||
}
|
||||
.footer-0-0-10 .right {
|
||||
padding-right: 16px;
|
||||
}
|
||||
}
|
||||
.footer-0-0-10 .main>.inside {
|
||||
display: inline-flex;
|
||||
overflow: auto;
|
||||
max-width: 100%;
|
||||
align-items: center;
|
||||
}
|
||||
.footer-0-0-10 .main>.inside hr {
|
||||
width: 2px;
|
||||
border: none;
|
||||
height: 16px;
|
||||
margin: 16px;
|
||||
background: #e0e0e0;
|
||||
}
|
||||
.footer-0-0-10 .main>.inside a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.footer-0-0-10 .main>.inside a:hover {
|
||||
text-decoration: underline ;
|
||||
}
|
||||
body.dark-mode-animate .footer-0-0-10 .main>.inside hr {
|
||||
transition: background .3s;
|
||||
}
|
||||
body.dark .footer-0-0-10 .main>.inside hr {
|
||||
background: #313131;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not(.dark-mode-animate) .footer-0-0-10 .main>.inside hr {
|
||||
background: #313131;
|
||||
}
|
||||
}
|
||||
.toc-0-0-11 {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: calc(50vw - 464px);
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
z-index: 101;
|
||||
position: fixed;
|
||||
transform: translateX(-50vw);
|
||||
background: #f1f1f1;
|
||||
border-right: 1px solid #e7e7e7;
|
||||
flex-direction: column;
|
||||
padding-bottom: 64px;
|
||||
}
|
||||
body.dark-mode-animate .toc-0-0-11 {
|
||||
transition: background .3s, border-color .3s;
|
||||
}
|
||||
body.dark .toc-0-0-11 {
|
||||
background: #1f1f1f;
|
||||
border-color: #282828;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not(.dark-mode-animate) .toc-0-0-11 {
|
||||
background: #1f1f1f;
|
||||
border-color: #282828;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 1200px) {
|
||||
.toc-0-0-11 {
|
||||
width: 100vw;
|
||||
transform: translateX(-110vw);
|
||||
}
|
||||
}
|
||||
.toc-0-0-11.animated {
|
||||
transition: transform .3s;
|
||||
}
|
||||
.toc-0-0-11.active {
|
||||
transform: translateX(0);
|
||||
}
|
||||
.toc-0-0-11 p {
|
||||
margin: 0;
|
||||
}
|
||||
.toc-0-0-11 a {
|
||||
border: 1px solid transparent;
|
||||
display: block;
|
||||
padding: 8px;
|
||||
margin-left: -8px;
|
||||
border-right: none;
|
||||
margin-right: 1px;
|
||||
border-radius: 3px;
|
||||
text-decoration: none;
|
||||
}
|
||||
body.dark-mode-animate .toc-0-0-11 a {
|
||||
transition: border-color .3s, background .3s;
|
||||
}
|
||||
.toc-0-0-11 a:hover {
|
||||
background: #f5f5f5;
|
||||
text-decoration: none;
|
||||
}
|
||||
.toc-0-0-11 a.current {
|
||||
background: #f5f5f5;
|
||||
border-color: #e7e7e7;
|
||||
margin-right: 0;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
body.dark .toc-0-0-11 a.current {
|
||||
background: hsl(0, 0%, 13.2%);
|
||||
border-color: #282828;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not(.dark-mode-animate) .toc-0-0-11 a.current {
|
||||
background: #212121;
|
||||
border-color: #282828;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 1200px) {
|
||||
.toc-0-0-11 a.current {
|
||||
border-right: 1px solid;
|
||||
margin-right: -8px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
body.dark .toc-0-0-11 a:hover {
|
||||
background: hsl(0, 0%, 13.2%);
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not(.dark-mode-animate) .toc-0-0-11 a:hover {
|
||||
background: hsl(0, 0%, 13.2%);
|
||||
}
|
||||
}
|
||||
body.dark-mode-animate .toc-0-0-11.animated {
|
||||
transition: transform .3s, background .3s, border-color .3s;
|
||||
}
|
||||
.content-0-0-12 {
|
||||
padding: 32px;
|
||||
overflow: auto;
|
||||
flex-grow: 1;
|
||||
margin-right: -1px;
|
||||
padding-right: 0;
|
||||
}
|
||||
@media screen and (max-width: 1200px) {
|
||||
.content-0-0-12 {
|
||||
margin-right: 0;
|
||||
padding-right: 32px;
|
||||
}
|
||||
}
|
||||
.contentnav-0-0-14 {
|
||||
right: 0;
|
||||
width: calc(50vw - 496px);
|
||||
bottom: 96px;
|
||||
position: fixed;
|
||||
font-size: 12px;
|
||||
border-left: 1px dashed #e0e0e0;
|
||||
margin-left: 64px;
|
||||
padding-left: 48px;
|
||||
}
|
||||
@media screen and (max-width: 1200px) {
|
||||
.contentnav-0-0-14 {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.contentnav-0-0-14 a {
|
||||
color: #424242;
|
||||
display: block;
|
||||
opacity: 0.2;
|
||||
text-decoration: none;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not(.dark-mode-animate) .contentnav-0-0-14 {
|
||||
border-color: #313131;
|
||||
}
|
||||
body:not(.dark-mode-animate) .contentnav-0-0-14 a {
|
||||
color: #eeeeee;
|
||||
}
|
||||
body:not(.dark-mode-animate) .contentnav-0-0-14 a:hover, body:not(.dark-mode-animate) .contentnav-0-0-14 a.active {
|
||||
color: #1eb2a6;
|
||||
}
|
||||
}
|
||||
body.dark .contentnav-0-0-14 {
|
||||
border-color: #313131;
|
||||
}
|
||||
body.dark .contentnav-0-0-14 a {
|
||||
color: #eeeeee;
|
||||
}
|
||||
body.dark .contentnav-0-0-14 a:hover, body.dark .contentnav-0-0-14 a.active {
|
||||
color: #1eb2a6;
|
||||
}
|
||||
body.dark-mode-animate .contentnav-0-0-14 a {
|
||||
transition: color .3s, opacity .3s;
|
||||
}
|
||||
.contentnav-0-0-14 a:hover, .contentnav-0-0-14 a.active {
|
||||
color: #1eb2a6;
|
||||
opacity: 1;
|
||||
}
|
||||
.contentnav-0-0-14 a.h2 {
|
||||
margin-left: 12px;
|
||||
}
|
||||
.contentnav-0-0-14 a.h3 {
|
||||
margin-left: 24px;
|
||||
}
|
||||
.contentnav-0-0-14 a.h4 {
|
||||
margin-left: 36px;
|
||||
}
|
||||
.contentnav-0-0-14 a.h5 {
|
||||
margin-left: 48px;
|
||||
}
|
||||
.contentnav-0-0-14 a.h6 {
|
||||
margin-left: 60px;
|
||||
}
|
||||
* {
|
||||
touch-action: manipulation;
|
||||
scroll-behavior: smooth;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
body {
|
||||
color: #424242;
|
||||
width: 100vw;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: #f5f5f5;
|
||||
overflow-x: hidden;
|
||||
backface-visibility: hidden;
|
||||
-webkit-backface-visibility: hidden;
|
||||
}
|
||||
body.dark-mode-animate {
|
||||
transition: color .3s, background .3s;
|
||||
}
|
||||
a {
|
||||
color: #1eb2a6;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
text-decoration-thickness: 2px;
|
||||
}
|
||||
body.dark-mode-animate a {
|
||||
transition: color .3s;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not(.dark-mode-animate) a {
|
||||
color: #1eb2a6;
|
||||
}
|
||||
}
|
||||
body.dark a {
|
||||
color: #1eb2a6;
|
||||
}
|
||||
.container {
|
||||
margin: 0 auto;
|
||||
padding: 96px 16px;
|
||||
max-width: 768px;
|
||||
transition: opacity .15s;
|
||||
}
|
||||
hr {
|
||||
border: none;
|
||||
margin: 64px;
|
||||
background: none;
|
||||
border-top: 1px solid #e0e0e0;
|
||||
}
|
||||
body.dark-mode-animate hr {
|
||||
transition: border-color .3s;
|
||||
}
|
||||
body.dark hr {
|
||||
border-color: #313131;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not(.dark-mode-animate) hr {
|
||||
border-color: #313131;
|
||||
}
|
||||
}
|
||||
blockquote {
|
||||
color: #757575;
|
||||
margin: 0;
|
||||
padding: 16px 40px;
|
||||
position: relative;
|
||||
background: #eeeeee;
|
||||
border-radius: 3px;
|
||||
}
|
||||
body.dark-mode-animate blockquote {
|
||||
transition: color .3s, background .3s;
|
||||
}
|
||||
blockquote:after {
|
||||
top: 16px;
|
||||
left: 16px;
|
||||
width: 8px;
|
||||
bottom: 16px;
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
background: radial-gradient(circle at center, #e0e0e0 50%, transparent 52%),transparent;
|
||||
background-size: 4px 4px;
|
||||
}
|
||||
body.dark-mode-animate blockquote:after {
|
||||
transition: color .3s, background .3s;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not(.dark-mode-animate) {
|
||||
color: #eeeeee;
|
||||
background: #212121;
|
||||
}
|
||||
body:not(.dark-mode-animate) blockquote {
|
||||
color: #cacaca;
|
||||
background: #282828;
|
||||
}
|
||||
body:not(.dark-mode-animate) blockquote:after {
|
||||
background: radial-gradient(circle at center, #363636 50%, transparent 52%),transparent;
|
||||
background-size: 4px 4px;
|
||||
}
|
||||
}
|
||||
body.dark {
|
||||
color: #eeeeee;
|
||||
background: #212121;
|
||||
}
|
||||
body.dark blockquote {
|
||||
color: #cacaca;
|
||||
background: #282828;
|
||||
}
|
||||
body.dark blockquote:after {
|
||||
background: radial-gradient(circle at center, #363636 50%, transparent 52%),transparent;
|
||||
background-size: 4px 4px;
|
||||
}
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
iframe {
|
||||
width: 100%;
|
||||
border: none;
|
||||
background: white;
|
||||
border-radius: 3px;
|
||||
}
|
||||
code {
|
||||
color: #616161;
|
||||
padding: 4px;
|
||||
font-size: .85em;
|
||||
background: #eeeeee;
|
||||
border-radius: 3px;
|
||||
}
|
||||
body.dark-mode-animate code {
|
||||
transition: color .3s, background .3s;
|
||||
}
|
||||
body.dark code {
|
||||
color: #e0e0e0;
|
||||
background: #282828;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not(.dark-mode-animate) code {
|
||||
color: #e0e0e0;
|
||||
background: #282828;
|
||||
}
|
||||
}
|
62
docs/examples.html
Normal file
62
docs/examples.html
Normal file
File diff suppressed because one or more lines are too long
64
docs/index.html
Normal file
64
docs/index.html
Normal file
@@ -0,0 +1,64 @@
|
||||
<!DOCTYPE html><html><head><title>Autorestic | autorestic</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"><meta name="robots" content="index,follow"><meta name="theme-color" content="#212121"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"><link href="https://fonts.googleapis.com/css?family=Hind:400,700&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:300,400&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined" rel="stylesheet"><style>
|
||||
body, input, button {
|
||||
font-family: 'Hind', sans-serif;
|
||||
}
|
||||
|
||||
code, .hljs {
|
||||
font-family: 'Source Code Pro', 'Courier New', Courier, monospace;
|
||||
}
|
||||
|
||||
.icon-font {
|
||||
font-family: 'Material Icons';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px; /* Preferred icon size */
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: nowrap;
|
||||
direction: ltr;
|
||||
|
||||
/* Support for all WebKit browsers. */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
/* Support for Safari and Chrome. */
|
||||
text-rendering: optimizeLegibility;
|
||||
|
||||
/* Support for Firefox. */
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Support for IE. */
|
||||
font-feature-settings: 'liga';
|
||||
}
|
||||
|
||||
.icon-font.outline {
|
||||
font-family: 'Material Icons Outlined';
|
||||
}
|
||||
</style><link href="/autorestic/./dist/codedoc-styles.css" rel="stylesheet"><script async="" defer="" src="/autorestic/./dist/codedoc-bundle.js"></script></head><body><div class="header-0-0-9"><script async="" defer="" src="https://buttons.github.io/buttons.js"></script><a class="github-button" data-color-scheme="no-preference: light; light: light; dark: dark;" data-icon="false" data-show-count="true" data-size="false" href="https://github.com/cupcakearmy/autorestic/">Star</a><br><br><a class="watermark-0-0-8" href="https://github.com/CONNECT-platform/codedoc" target="_blank">Created With<svg viewBox="0 0 536 296" version="1.1" xmlns="http://www.w3.org/2000/svg"><g id="codedoc" transform="translate(-244.000000, -364.000000)" fill-rule="nonzero"><path d="M580,532 C615.346224,532 644,560.653776 644,596 C644,631.346224 615.346224,660 580,660 C544.653776,660 516,631.346224 516,596 C516,560.653776 544.653776,532 580,532 Z M716,532 C751.346224,532 780,560.653776 780,596 C780,631.346224 751.346224,660 716,660 L692,660 C687.581722,660 684,656.418278 684,652 C684,647.581722 687.581722,644 692,644 L716,644 C742.509668,644 764,622.509668 764,596 C764,569.490332 742.509668,548 716,548 L692,548 C687.581722,548 684,544.418278 684,540 C684,535.581722 687.581722,532 692,532 L716,532 Z M468,532 C472.418278,532 476,535.581722 476,540 L476,652 C476,656.418278 472.418278,660 468,660 L444,660 C408.653776,660 380,631.346224 380,596 C380,560.653776 408.653776,532 444,532 L468,532 Z M332,532 C336.418278,532 340,535.581722 340,540 L340,652 C340,656.418278 336.418278,660 332,660 L252,660 C247.581722,660 244,656.418278 244,652 L244,540 C244,535.581722 247.581722,532 252,532 L332,532 Z M580,548 C553.490332,548 532,569.490332 532,596 C532,622.509668 553.490332,644 580,644 C606.509668,644 628,622.509668 628,596 C628,569.490332 606.509668,548 580,548 Z M461,548 L444,548 C417.490332,548 396,569.490332 396,596 C396,622.509668 417.490332,644 444,644 L461,644 L461,548 Z M444,364 C479.346224,364 508,392.653776 508,428 C508,463.346224 479.346224,492 444,492 C408.653776,492 380,463.346224 380,428 C380,392.653776 408.653776,364 444,364 Z M332,364 C336.418278,364 340,367.581722 340,372 C340,376.418278 336.418278,380 332,380 L308,380 C281.490332,380 260,401.490332 260,428 C260,454.509668 281.490332,476 308,476 L332,476 C336.418278,476 340,479.581722 340,484 C340,488.418278 336.418278,492 332,492 L308,492 C272.653776,492 244,463.346224 244,428 C244,392.653776 272.653776,364 308,364 L332,364 Z M580,364 C615.346224,364 644,392.653776 644,428 C644,463.346224 615.346224,492 580,492 L556,492 C551.581722,492 548,488.418278 548,484 L548,372 C548,367.581722 551.581722,364 556,364 L580,364 Z M772,364 C776.418278,364 780,367.581722 780,372 C780,376.418278 776.418278,380 772,380 L700,380 L700,420 L772,420 C776.418278,420 780,423.581722 780,428 C780,432.418278 776.418278,436 772,436 L700,436 L700,476 L772,476 C776.418278,476 780,479.581722 780,484 C780,488.418278 776.418278,492 772,492 L692,492 C687.581722,492 684,488.418278 684,484 L684,372 C684,367.581722 687.581722,364 692,364 L772,364 Z M444,380 C417.490332,380 396,401.490332 396,428 C396,454.509668 417.490332,476 444,476 C470.509668,476 492,454.509668 492,428 C492,401.490332 470.509668,380 444,380 Z M580,380 L563,380 L563,476 L580,476 C606.509668,476 628,454.509668 628,428 C628,401.490332 606.509668,380 580,380 Z"></path></g></svg></a></div><div id="-codedoc-container" class="container"><h1 id="autorestic" class="heading-0-0-1"><span class="anchor-0-0-2" data-ignore-text=""><span class="icon-font" data-ignore-text="" style="vertical-align: sub">link</span></span>autorestic</h1><p>High backup level CLI utility for <a href="https://restic.net/">restic</a>.</p><p>Autorestic is a wrapper around the amazing <a href="https://restic.net/">restic</a>. While being amazing the restic cli can be a bit overwhelming and difficult to manage if you have many different location that you want to backup to multiple locations. This utility is aimed at making this easier 🙂</p><marker><!--  -->
|
||||
|
||||
</marker><h2 id="✈️-roadmap" class="heading-0-0-1"><span class="anchor-0-0-2" data-ignore-text=""><span class="icon-font" data-ignore-text="" style="vertical-align: sub">link</span></span>✈️ Roadmap</h2><p><del>I would like to make the official <code>1.0</code> release in the coming months. Until then please feel free to file issues or feature requests so that the tool is as flexible as possible :)</del></p><p>As of version <code>0.18</code> crons are supported wich where the last feature missing for a <code>1.0</code>. Will test this for a few weeks and then it's time for the first "real" release! 🎉 Also we now have waaay better docs 📒</p><h2 id="🌈-features" class="heading-0-0-1"><span class="anchor-0-0-2" data-ignore-text=""><span class="icon-font" data-ignore-text="" style="vertical-align: sub">link</span></span>🌈 Features</h2><ul><li>YAML config files, no CLI</li><li>Incremental -> Minimal space is used</li><li>Backup locations to multiple backends</li><li>Snapshot policies and pruning</li><li>Fully encrypted</li><li>Pre/After hooks</li><li>Exclude pattern/files</li><li>Cron jobs for automatic backup</li><li>Backup & Restore docker volumes</li></ul><script id="r_BMYmMFNs">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("r_BMYmMFNs", "qcaKEY878Mn2dFQW/lSrDg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="contentnav-0-0-14" data-no-search=""><a href="#autorestic" class="h1" data-content-highlight="autorestic">autorestic</a><a href="#✈️-roadmap" class="h2" data-content-highlight="✈️-roadmap">✈️ Roadmap</a><a href="#🌈-features" class="h2" data-content-highlight="🌈-features">🌈 Features</a></div></div><div id="-codedoc-toc" class="toc-0-0-11"><script>
|
||||
if (window.matchMedia('(min-width: 1200px)').matches) {
|
||||
if (!localStorage.getItem('-codedoc-toc-active')) {
|
||||
localStorage.setItem('-codedoc-toc-active', "true");
|
||||
}
|
||||
}
|
||||
</script><div class="content-0-0-12"><p><a href="/autorestic/">Home</a>
|
||||
<a href="/autorestic/quick">Quick Start</a>
|
||||
<a href="/autorestic/installation">Installation</a>
|
||||
<a href="/autorestic/config">Configuration</a></p><div class="collapse-0-0-7 "><script id="DzuDnakcuH">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("DzuDnakcuH", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">Locations</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/location/overview">Overview</a>
|
||||
<a href="/autorestic/location/hooks">Hooks</a>
|
||||
<a href="/autorestic/location/exclude">Excluding Files</a>
|
||||
<a href="/autorestic/location/forget">Forget Policy</a>
|
||||
<a href="/autorestic/location/cron">Cron</a>
|
||||
<a href="/autorestic/location/docker">Docker Volumes</a></p></div></div><div class="collapse-0-0-7 "><script id="JLHMW_wmcN">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("JLHMW_wmcN", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">Backend</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/backend/overview">Overview</a>
|
||||
<a href="/autorestic/backend/available">Available Backends</a></p></div></div><div class="collapse-0-0-7 "><script id="UusCFxQvyJ">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("UusCFxQvyJ", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">CLI</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/cli/info">Info</a>
|
||||
<a href="/autorestic/cli/check">Check</a>
|
||||
<a href="/autorestic/cli/backup">Backup</a>
|
||||
<a href="/autorestic/cli/restore">Restore</a>
|
||||
<a href="/autorestic/cli/forget">Forget</a>
|
||||
<a href="/autorestic/cli/cron">Cron</a>
|
||||
<a href="/autorestic/cli/exec">Exec</a>
|
||||
<a href="/autorestic/cli/install">Install</a>
|
||||
<a href="/autorestic/cli/uninstall">Uninstall</a>
|
||||
<a href="/autorestic/cli/update">Update</a></p></div></div><p><a href="/autorestic/examples">Examples</a></p><p><a href="/autorestic/qa">QA</a></p><p><a href="/autorestic/contrib">Contributors</a></p></div><div class="search-0-0-13"><script id="Z_WxkSaBLH">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("Z_WxkSaBLH", "+SrlfVhZ/PRQ5WhUlZbTaA==", {"repo":"autorestic","user":"cupcakearmy","root":"docs/md","pick":"\\.md$","drop":"(^_)|(\\/_)"});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div></div><div class="footer-0-0-10"><div class="left"><script id="Jml_wR_VIt">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("Jml_wR_VIt", "XsNW3ht5ee+RmVUActEo9g==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div><div class="main"><div class="inside"><a href="https://github.com/cupcakearmy/autorestic/" target="_blank">GitHub</a></div></div><div class="right"><script id="OuWGpIkdDP">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("OuWGpIkdDP", "Y1WWvCKxkgk1yh8xbCfXqw==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div></div><script id="YEXMkhcOIZ">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("YEXMkhcOIZ", "v641FmLj+AeGp0uuFTI6ug==", {"namespace":"/autorestic"});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></body></html>
|
62
docs/installation.html
Normal file
62
docs/installation.html
Normal file
@@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html><html><head><title>Autorestic | 🛳 Installation</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"><meta name="robots" content="index,follow"><meta name="theme-color" content="#212121"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"><link href="https://fonts.googleapis.com/css?family=Hind:400,700&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:300,400&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined" rel="stylesheet"><style>
|
||||
body, input, button {
|
||||
font-family: 'Hind', sans-serif;
|
||||
}
|
||||
|
||||
code, .hljs {
|
||||
font-family: 'Source Code Pro', 'Courier New', Courier, monospace;
|
||||
}
|
||||
|
||||
.icon-font {
|
||||
font-family: 'Material Icons';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px; /* Preferred icon size */
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: nowrap;
|
||||
direction: ltr;
|
||||
|
||||
/* Support for all WebKit browsers. */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
/* Support for Safari and Chrome. */
|
||||
text-rendering: optimizeLegibility;
|
||||
|
||||
/* Support for Firefox. */
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Support for IE. */
|
||||
font-feature-settings: 'liga';
|
||||
}
|
||||
|
||||
.icon-font.outline {
|
||||
font-family: 'Material Icons Outlined';
|
||||
}
|
||||
</style><link href="/autorestic/./dist/codedoc-styles.css" rel="stylesheet"><script async="" defer="" src="/autorestic/./dist/codedoc-bundle.js"></script></head><body><div class="header-0-0-9"><script async="" defer="" src="https://buttons.github.io/buttons.js"></script><a class="github-button" data-color-scheme="no-preference: light; light: light; dark: dark;" data-icon="false" data-show-count="true" data-size="false" href="https://github.com/cupcakearmy/autorestic/">Star</a><br><br><a class="watermark-0-0-8" href="https://github.com/CONNECT-platform/codedoc" target="_blank">Created With<svg viewBox="0 0 536 296" version="1.1" xmlns="http://www.w3.org/2000/svg"><g id="codedoc" transform="translate(-244.000000, -364.000000)" fill-rule="nonzero"><path d="M580,532 C615.346224,532 644,560.653776 644,596 C644,631.346224 615.346224,660 580,660 C544.653776,660 516,631.346224 516,596 C516,560.653776 544.653776,532 580,532 Z M716,532 C751.346224,532 780,560.653776 780,596 C780,631.346224 751.346224,660 716,660 L692,660 C687.581722,660 684,656.418278 684,652 C684,647.581722 687.581722,644 692,644 L716,644 C742.509668,644 764,622.509668 764,596 C764,569.490332 742.509668,548 716,548 L692,548 C687.581722,548 684,544.418278 684,540 C684,535.581722 687.581722,532 692,532 L716,532 Z M468,532 C472.418278,532 476,535.581722 476,540 L476,652 C476,656.418278 472.418278,660 468,660 L444,660 C408.653776,660 380,631.346224 380,596 C380,560.653776 408.653776,532 444,532 L468,532 Z M332,532 C336.418278,532 340,535.581722 340,540 L340,652 C340,656.418278 336.418278,660 332,660 L252,660 C247.581722,660 244,656.418278 244,652 L244,540 C244,535.581722 247.581722,532 252,532 L332,532 Z M580,548 C553.490332,548 532,569.490332 532,596 C532,622.509668 553.490332,644 580,644 C606.509668,644 628,622.509668 628,596 C628,569.490332 606.509668,548 580,548 Z M461,548 L444,548 C417.490332,548 396,569.490332 396,596 C396,622.509668 417.490332,644 444,644 L461,644 L461,548 Z M444,364 C479.346224,364 508,392.653776 508,428 C508,463.346224 479.346224,492 444,492 C408.653776,492 380,463.346224 380,428 C380,392.653776 408.653776,364 444,364 Z M332,364 C336.418278,364 340,367.581722 340,372 C340,376.418278 336.418278,380 332,380 L308,380 C281.490332,380 260,401.490332 260,428 C260,454.509668 281.490332,476 308,476 L332,476 C336.418278,476 340,479.581722 340,484 C340,488.418278 336.418278,492 332,492 L308,492 C272.653776,492 244,463.346224 244,428 C244,392.653776 272.653776,364 308,364 L332,364 Z M580,364 C615.346224,364 644,392.653776 644,428 C644,463.346224 615.346224,492 580,492 L556,492 C551.581722,492 548,488.418278 548,484 L548,372 C548,367.581722 551.581722,364 556,364 L580,364 Z M772,364 C776.418278,364 780,367.581722 780,372 C780,376.418278 776.418278,380 772,380 L700,380 L700,420 L772,420 C776.418278,420 780,423.581722 780,428 C780,432.418278 776.418278,436 772,436 L700,436 L700,476 L772,476 C776.418278,476 780,479.581722 780,484 C780,488.418278 776.418278,492 772,492 L692,492 C687.581722,492 684,488.418278 684,484 L684,372 C684,367.581722 687.581722,364 692,364 L772,364 Z M444,380 C417.490332,380 396,401.490332 396,428 C396,454.509668 417.490332,476 444,476 C470.509668,476 492,454.509668 492,428 C492,401.490332 470.509668,380 444,380 Z M580,380 L563,380 L563,476 L580,476 C606.509668,476 628,454.509668 628,428 C628,401.490332 606.509668,380 580,380 Z"></path></g></svg></a></div><div id="-codedoc-container" class="container"><h1 id="🛳-installation" class="heading-0-0-1"><span class="anchor-0-0-2" data-ignore-text=""><span class="icon-font" data-ignore-text="" style="vertical-align: sub">link</span></span>🛳 Installation</h1><p>Linux & macOS. Windows is not supported. If you have problems installing please open an issue :)</p><p>Autorestic requires <code>curl</code>, <code>wget</code> and <code>bzip2</code> to be installed. For most systems these should be already installed.</p><pre class=""><code class="bash code-0-0-3" tabindex="0"><span class="wmbar-0-0-6"><span></span><span></span><span></span><span></span></span><div class="line-0-0-5 " data-content="curl -s https://raw.githubusercontent.com/CupCakeArmy/autorestic/master/install.sh | bash"><span class="lineCounter-0-0-4 prim">1</span><span class="token function">curl</span> -s https://raw.githubusercontent.com/CupCakeArmy/autorestic/master/install.sh <span class="token operator">|</span> <span class="token function">bash</span></div><br></code></pre><script id="zUkIOdBBaA">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("zUkIOdBBaA", "qcaKEY878Mn2dFQW/lSrDg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="contentnav-0-0-14" data-no-search=""><a href="#🛳-installation" class="h1" data-content-highlight="🛳-installation">🛳 Installation</a></div></div><div id="-codedoc-toc" class="toc-0-0-11"><script>
|
||||
if (window.matchMedia('(min-width: 1200px)').matches) {
|
||||
if (!localStorage.getItem('-codedoc-toc-active')) {
|
||||
localStorage.setItem('-codedoc-toc-active', "true");
|
||||
}
|
||||
}
|
||||
</script><div class="content-0-0-12"><p><a href="/autorestic/">Home</a>
|
||||
<a href="/autorestic/quick">Quick Start</a>
|
||||
<a href="/autorestic/installation">Installation</a>
|
||||
<a href="/autorestic/config">Configuration</a></p><div class="collapse-0-0-7 "><script id="aClypYvXxg">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("aClypYvXxg", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">Locations</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/location/overview">Overview</a>
|
||||
<a href="/autorestic/location/hooks">Hooks</a>
|
||||
<a href="/autorestic/location/exclude">Excluding Files</a>
|
||||
<a href="/autorestic/location/forget">Forget Policy</a>
|
||||
<a href="/autorestic/location/cron">Cron</a>
|
||||
<a href="/autorestic/location/docker">Docker Volumes</a></p></div></div><div class="collapse-0-0-7 "><script id="lREhehqsdu">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("lREhehqsdu", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">Backend</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/backend/overview">Overview</a>
|
||||
<a href="/autorestic/backend/available">Available Backends</a></p></div></div><div class="collapse-0-0-7 "><script id="XvpnyWgAto">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("XvpnyWgAto", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">CLI</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/cli/info">Info</a>
|
||||
<a href="/autorestic/cli/check">Check</a>
|
||||
<a href="/autorestic/cli/backup">Backup</a>
|
||||
<a href="/autorestic/cli/restore">Restore</a>
|
||||
<a href="/autorestic/cli/forget">Forget</a>
|
||||
<a href="/autorestic/cli/cron">Cron</a>
|
||||
<a href="/autorestic/cli/exec">Exec</a>
|
||||
<a href="/autorestic/cli/install">Install</a>
|
||||
<a href="/autorestic/cli/uninstall">Uninstall</a>
|
||||
<a href="/autorestic/cli/update">Update</a></p></div></div><p><a href="/autorestic/examples">Examples</a></p><p><a href="/autorestic/qa">QA</a></p><p><a href="/autorestic/contrib">Contributors</a></p></div><div class="search-0-0-13"><script id="DxrfjNdJg_">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("DxrfjNdJg_", "+SrlfVhZ/PRQ5WhUlZbTaA==", {"repo":"autorestic","user":"cupcakearmy","root":"docs/md","pick":"\\.md$","drop":"(^_)|(\\/_)"});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div></div><div class="footer-0-0-10"><div class="left"><script id="PtQxnmAGzJ">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("PtQxnmAGzJ", "XsNW3ht5ee+RmVUActEo9g==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div><div class="main"><div class="inside"><a href="https://github.com/cupcakearmy/autorestic/" target="_blank">GitHub</a></div></div><div class="right"><script id="ehvuzKVwDZ">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("ehvuzKVwDZ", "Y1WWvCKxkgk1yh8xbCfXqw==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div></div><script id="XTnyeRkIIo">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("XTnyeRkIIo", "v641FmLj+AeGp0uuFTI6ug==", {"namespace":"/autorestic"});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></body></html>
|
64
docs/location/cron.html
Normal file
64
docs/location/cron.html
Normal file
File diff suppressed because one or more lines are too long
62
docs/location/docker.html
Normal file
62
docs/location/docker.html
Normal file
File diff suppressed because one or more lines are too long
62
docs/location/exclude.html
Normal file
62
docs/location/exclude.html
Normal file
File diff suppressed because one or more lines are too long
62
docs/location/forget.html
Normal file
62
docs/location/forget.html
Normal file
File diff suppressed because one or more lines are too long
62
docs/location/hooks.html
Normal file
62
docs/location/hooks.html
Normal file
File diff suppressed because one or more lines are too long
63
docs/location/overview.html
Normal file
63
docs/location/overview.html
Normal file
@@ -0,0 +1,63 @@
|
||||
<!DOCTYPE html><html><head><title>Autorestic | 🗂 Locations</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"><meta name="robots" content="index,follow"><meta name="theme-color" content="#212121"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"><link href="https://fonts.googleapis.com/css?family=Hind:400,700&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:300,400&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined" rel="stylesheet"><style>
|
||||
body, input, button {
|
||||
font-family: 'Hind', sans-serif;
|
||||
}
|
||||
|
||||
code, .hljs {
|
||||
font-family: 'Source Code Pro', 'Courier New', Courier, monospace;
|
||||
}
|
||||
|
||||
.icon-font {
|
||||
font-family: 'Material Icons';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px; /* Preferred icon size */
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: nowrap;
|
||||
direction: ltr;
|
||||
|
||||
/* Support for all WebKit browsers. */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
/* Support for Safari and Chrome. */
|
||||
text-rendering: optimizeLegibility;
|
||||
|
||||
/* Support for Firefox. */
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Support for IE. */
|
||||
font-feature-settings: 'liga';
|
||||
}
|
||||
|
||||
.icon-font.outline {
|
||||
font-family: 'Material Icons Outlined';
|
||||
}
|
||||
</style><link href="/autorestic/./dist/codedoc-styles.css" rel="stylesheet"><script async="" defer="" src="/autorestic/./dist/codedoc-bundle.js"></script></head><body><div class="header-0-0-9"><script async="" defer="" src="https://buttons.github.io/buttons.js"></script><a class="github-button" data-color-scheme="no-preference: light; light: light; dark: dark;" data-icon="false" data-show-count="true" data-size="false" href="https://github.com/cupcakearmy/autorestic/">Star</a><br><br><a class="watermark-0-0-8" href="https://github.com/CONNECT-platform/codedoc" target="_blank">Created With<svg viewBox="0 0 536 296" version="1.1" xmlns="http://www.w3.org/2000/svg"><g id="codedoc" transform="translate(-244.000000, -364.000000)" fill-rule="nonzero"><path d="M580,532 C615.346224,532 644,560.653776 644,596 C644,631.346224 615.346224,660 580,660 C544.653776,660 516,631.346224 516,596 C516,560.653776 544.653776,532 580,532 Z M716,532 C751.346224,532 780,560.653776 780,596 C780,631.346224 751.346224,660 716,660 L692,660 C687.581722,660 684,656.418278 684,652 C684,647.581722 687.581722,644 692,644 L716,644 C742.509668,644 764,622.509668 764,596 C764,569.490332 742.509668,548 716,548 L692,548 C687.581722,548 684,544.418278 684,540 C684,535.581722 687.581722,532 692,532 L716,532 Z M468,532 C472.418278,532 476,535.581722 476,540 L476,652 C476,656.418278 472.418278,660 468,660 L444,660 C408.653776,660 380,631.346224 380,596 C380,560.653776 408.653776,532 444,532 L468,532 Z M332,532 C336.418278,532 340,535.581722 340,540 L340,652 C340,656.418278 336.418278,660 332,660 L252,660 C247.581722,660 244,656.418278 244,652 L244,540 C244,535.581722 247.581722,532 252,532 L332,532 Z M580,548 C553.490332,548 532,569.490332 532,596 C532,622.509668 553.490332,644 580,644 C606.509668,644 628,622.509668 628,596 C628,569.490332 606.509668,548 580,548 Z M461,548 L444,548 C417.490332,548 396,569.490332 396,596 C396,622.509668 417.490332,644 444,644 L461,644 L461,548 Z M444,364 C479.346224,364 508,392.653776 508,428 C508,463.346224 479.346224,492 444,492 C408.653776,492 380,463.346224 380,428 C380,392.653776 408.653776,364 444,364 Z M332,364 C336.418278,364 340,367.581722 340,372 C340,376.418278 336.418278,380 332,380 L308,380 C281.490332,380 260,401.490332 260,428 C260,454.509668 281.490332,476 308,476 L332,476 C336.418278,476 340,479.581722 340,484 C340,488.418278 336.418278,492 332,492 L308,492 C272.653776,492 244,463.346224 244,428 C244,392.653776 272.653776,364 308,364 L332,364 Z M580,364 C615.346224,364 644,392.653776 644,428 C644,463.346224 615.346224,492 580,492 L556,492 C551.581722,492 548,488.418278 548,484 L548,372 C548,367.581722 551.581722,364 556,364 L580,364 Z M772,364 C776.418278,364 780,367.581722 780,372 C780,376.418278 776.418278,380 772,380 L700,380 L700,420 L772,420 C776.418278,420 780,423.581722 780,428 C780,432.418278 776.418278,436 772,436 L700,436 L700,476 L772,476 C776.418278,476 780,479.581722 780,484 C780,488.418278 776.418278,492 772,492 L692,492 C687.581722,492 684,488.418278 684,484 L684,372 C684,367.581722 687.581722,364 692,364 L772,364 Z M444,380 C417.490332,380 396,401.490332 396,428 C396,454.509668 417.490332,476 444,476 C470.509668,476 492,454.509668 492,428 C492,401.490332 470.509668,380 444,380 Z M580,380 L563,380 L563,476 L580,476 C606.509668,476 628,454.509668 628,428 C628,401.490332 606.509668,380 580,380 Z"></path></g></svg></a></div><div id="-codedoc-container" class="container"><h1 id="🗂-locations" class="heading-0-0-1"><span class="anchor-0-0-2" data-ignore-text=""><span class="icon-font" data-ignore-text="" style="vertical-align: sub">link</span></span>🗂 Locations</h1><p>Locations can be seen as the input to the backup process. Generally this is simply a folder.
|
||||
The paths can be relative from the config file. A location can have multiple backends, so that the data is secured across multiple servers.</p><pre class="with-bar"><code class="yaml code-0-0-3" tabindex="0"><span class="wmbar-0-0-6"><span></span><span></span><span></span><span>.autorestic.yml</span></span><div class="line-0-0-5 " data-content="locations:"><span class="lineCounter-0-0-4 prim">1</span><span class="token key atrule">locations</span><span class="token punctuation">:</span></div><br><div class="line-0-0-5 " data-content=" my-location-name:"><span class="lineCounter-0-0-4">2</span> <span class="token key atrule">my-location-name</span><span class="token punctuation">:</span></div><br><div class="line-0-0-5 " data-content=" from: path/to/backup"><span class="lineCounter-0-0-4">3</span> <span class="token key atrule">from</span><span class="token punctuation">:</span> path/to/backup</div><br><div class="line-0-0-5 " data-content=" to:"><span class="lineCounter-0-0-4">4</span> <span class="token key atrule">to</span><span class="token punctuation">:</span></div><br><div class="line-0-0-5 " data-content=" - name-of-backend"><span class="lineCounter-0-0-4 prim">5</span> <span class="token punctuation">-</span> name<span class="token punctuation">-</span>of<span class="token punctuation">-</span>backend</div><br><div class="line-0-0-5 " data-content=" - also-backup-to-this-backend"><span class="lineCounter-0-0-4 prim">6</span> <span class="token punctuation">-</span> also<span class="token punctuation">-</span>backup<span class="token punctuation">-</span>to<span class="token punctuation">-</span>this<span class="token punctuation">-</span>backend</div><br></code></pre><h2 id="from" class="heading-0-0-1"><span class="anchor-0-0-2" data-ignore-text=""><span class="icon-font" data-ignore-text="" style="vertical-align: sub">link</span></span><code>from</code></h2><p>This is the source of the location.</p><h4 id="how-are-paths-resolved" class="heading-0-0-1"><span class="anchor-0-0-2" data-ignore-text=""><span class="icon-font" data-ignore-text="" style="vertical-align: sub">link</span></span>How are paths resolved?</h4><p>Paths can be absolute or relative. If relative they are resolved relative to the location of the config file. Tilde <code>~</code> paths are also supported for home folder resolution.</p><h2 id="to" class="heading-0-0-1"><span class="anchor-0-0-2" data-ignore-text=""><span class="icon-font" data-ignore-text="" style="vertical-align: sub">link</span></span><code>to</code></h2><p>This is einther a single backend or an array of backends. The backends have to be configured in the same config file.</p><script id="UtxCDNLxWb">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("UtxCDNLxWb", "qcaKEY878Mn2dFQW/lSrDg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="contentnav-0-0-14" data-no-search=""><a href="#🗂-locations" class="h1" data-content-highlight="🗂-locations">🗂 Locations</a><a href="#from" class="h2" data-content-highlight="from">from</a><a href="#how-are-paths-resolved" class="h4" data-content-highlight="how-are-paths-resolved">How are paths resolved?</a><a href="#to" class="h2" data-content-highlight="to">to</a></div></div><div id="-codedoc-toc" class="toc-0-0-11"><script>
|
||||
if (window.matchMedia('(min-width: 1200px)').matches) {
|
||||
if (!localStorage.getItem('-codedoc-toc-active')) {
|
||||
localStorage.setItem('-codedoc-toc-active', "true");
|
||||
}
|
||||
}
|
||||
</script><div class="content-0-0-12"><p><a href="/autorestic/">Home</a>
|
||||
<a href="/autorestic/quick">Quick Start</a>
|
||||
<a href="/autorestic/installation">Installation</a>
|
||||
<a href="/autorestic/config">Configuration</a></p><div class="collapse-0-0-7 "><script id="OjrBIwpcML">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("OjrBIwpcML", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">Locations</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/location/overview">Overview</a>
|
||||
<a href="/autorestic/location/hooks">Hooks</a>
|
||||
<a href="/autorestic/location/exclude">Excluding Files</a>
|
||||
<a href="/autorestic/location/forget">Forget Policy</a>
|
||||
<a href="/autorestic/location/cron">Cron</a>
|
||||
<a href="/autorestic/location/docker">Docker Volumes</a></p></div></div><div class="collapse-0-0-7 "><script id="ITowATuoIl">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("ITowATuoIl", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">Backend</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/backend/overview">Overview</a>
|
||||
<a href="/autorestic/backend/available">Available Backends</a></p></div></div><div class="collapse-0-0-7 "><script id="uZkmwddyAM">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("uZkmwddyAM", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">CLI</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/cli/info">Info</a>
|
||||
<a href="/autorestic/cli/check">Check</a>
|
||||
<a href="/autorestic/cli/backup">Backup</a>
|
||||
<a href="/autorestic/cli/restore">Restore</a>
|
||||
<a href="/autorestic/cli/forget">Forget</a>
|
||||
<a href="/autorestic/cli/cron">Cron</a>
|
||||
<a href="/autorestic/cli/exec">Exec</a>
|
||||
<a href="/autorestic/cli/install">Install</a>
|
||||
<a href="/autorestic/cli/uninstall">Uninstall</a>
|
||||
<a href="/autorestic/cli/update">Update</a></p></div></div><p><a href="/autorestic/examples">Examples</a></p><p><a href="/autorestic/qa">QA</a></p><p><a href="/autorestic/contrib">Contributors</a></p></div><div class="search-0-0-13"><script id="GYYUHymBgV">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("GYYUHymBgV", "+SrlfVhZ/PRQ5WhUlZbTaA==", {"repo":"autorestic","user":"cupcakearmy","root":"docs/md","pick":"\\.md$","drop":"(^_)|(\\/_)"});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div></div><div class="footer-0-0-10"><div class="left"><script id="TxuSEUJbDE">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("TxuSEUJbDE", "XsNW3ht5ee+RmVUActEo9g==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div><div class="main"><div class="inside"><a href="https://github.com/cupcakearmy/autorestic/" target="_blank">GitHub</a></div></div><div class="right"><script id="TjsjVMapDr">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("TjsjVMapDr", "Y1WWvCKxkgk1yh8xbCfXqw==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div></div><script id="wOqKaBgDQf">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("wOqKaBgDQf", "v641FmLj+AeGp0uuFTI6ug==", {"namespace":"/autorestic"});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></body></html>
|
37
docs/md/_toc.md
Normal file
37
docs/md/_toc.md
Normal file
@@ -0,0 +1,37 @@
|
||||
[Home](/)
|
||||
[Quick Start](/quick)
|
||||
[Installation](/installation)
|
||||
[Configuration](/config)
|
||||
|
||||
> :Collapse label=Locations
|
||||
>
|
||||
> [Overview](/location/overview)
|
||||
> [Hooks](/location/hooks)
|
||||
> [Excluding Files](/location/exclude)
|
||||
> [Forget Policy](/location/forget)
|
||||
> [Cron](/location/cron)
|
||||
> [Docker Volumes](/location/docker)
|
||||
|
||||
> :Collapse label=Backend
|
||||
>
|
||||
> [Overview](/backend/overview)
|
||||
> [Available Backends](/backend/available)
|
||||
|
||||
> :Collapse label=CLI
|
||||
>
|
||||
> [Info](/cli/info)
|
||||
> [Check](/cli/check)
|
||||
> [Backup](/cli/backup)
|
||||
> [Restore](/cli/restore)
|
||||
> [Forget](/cli/forget)
|
||||
> [Cron](/cli/cron)
|
||||
> [Exec](/cli/exec)
|
||||
> [Install](/cli/install)
|
||||
> [Uninstall](/cli/uninstall)
|
||||
> [Update](/cli/update)
|
||||
|
||||
[Examples](/examples)
|
||||
|
||||
[QA](/qa)
|
||||
|
||||
[Contributors](/contrib)
|
62
docs/md/backend/available.md
Normal file
62
docs/md/backend/available.md
Normal file
@@ -0,0 +1,62 @@
|
||||
# Available Backends
|
||||
|
||||
In theory [all the restic backends](https://restic.readthedocs.io/en/stable/030_preparing_a_new_repo.html) are supported.
|
||||
|
||||
Those tested are the following:
|
||||
|
||||
## Local
|
||||
|
||||
```yaml
|
||||
backends:
|
||||
name-of-backend:
|
||||
type: local
|
||||
path: /data/my/backups
|
||||
```
|
||||
|
||||
## Backblaze
|
||||
|
||||
```yaml
|
||||
backends:
|
||||
name-of-backend:
|
||||
type: b2
|
||||
path: 'myAccount:myBucket/my/path'
|
||||
B2_ACCOUNT_ID: backblaze_account_id
|
||||
B2_ACCOUNT_KEY: backblaze_account_key
|
||||
```
|
||||
|
||||
## S3 / Minio
|
||||
|
||||
```yaml
|
||||
backends:
|
||||
name-of-backend:
|
||||
type: s3
|
||||
path: s3.amazonaws.com/bucket_name
|
||||
# Minio
|
||||
# path: http://localhost:9000/bucket_name
|
||||
AWS_ACCESS_KEY_ID: my_key
|
||||
AWS_SECRET_ACCESS_KEY: my_secret
|
||||
```
|
||||
|
||||
## SFTP
|
||||
|
||||
For SFTP to work you need to use configure your host inside of ~/.ssh/config as password prompt is not supported. For more information on this topic please see the [official docs](https://restic.readthedocs.io/en/stable/030_preparing_a_new_repo.html#sftp) on the matter.
|
||||
|
||||
```yaml
|
||||
backends:
|
||||
name-of-backend:
|
||||
type: sftp
|
||||
path: my-host:/remote/path/on/the/server
|
||||
```
|
||||
|
||||
## Rest Server
|
||||
|
||||
See [here](https://github.com/restic/rest-server) for how to install a rest server backend and [here](https://restic.readthedocs.io/en/latest/030_preparing_a_new_repo.html#rest-server) for further documentation.
|
||||
|
||||
```yaml
|
||||
backends:
|
||||
name-of-backend:
|
||||
type: rest
|
||||
path: http://localhost:8000/repo_name
|
||||
```
|
||||
|
||||
> :ToCPrevNext
|
16
docs/md/backend/overview.md
Normal file
16
docs/md/backend/overview.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# 💽 Backends
|
||||
|
||||
Backends are the ouputs of the backup process. Each location needs at least one.
|
||||
|
||||
```yaml | .autorestic.yml
|
||||
backends:
|
||||
name-of-backend:
|
||||
type: local
|
||||
path: /data/my/backups
|
||||
```
|
||||
|
||||
## Types
|
||||
|
||||
We restic supports multiple types of backends. See the [full list](/backend/available) for details.
|
||||
|
||||
> :ToCPrevNext
|
13
docs/md/cli/backup.md
Normal file
13
docs/md/cli/backup.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Backup
|
||||
|
||||
```bash
|
||||
autorestic backup [-l, --location] [-a, --all]
|
||||
```
|
||||
|
||||
Performes a backup of all locations if the `-a` flag is passed. To only backup some locations pass one or more `-l` or `--location` flags.
|
||||
|
||||
```bash
|
||||
autorestic backup -l my-location
|
||||
```
|
||||
|
||||
> :ToCPrevNext
|
15
docs/md/cli/check.md
Normal file
15
docs/md/cli/check.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# check
|
||||
|
||||
```bash
|
||||
autorestic check [-b, --backend] [-a, --all]
|
||||
```
|
||||
|
||||
Cheks if one or more backend are configured properly and initializes them if they are not already.
|
||||
|
||||
This is mostly an internal command, but useful to verify if a backend is configured correctly.
|
||||
|
||||
```bash
|
||||
autorestic check -b my-backend
|
||||
```
|
||||
|
||||
> :ToCPrevNext
|
11
docs/md/cli/cron.md
Normal file
11
docs/md/cli/cron.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Cron
|
||||
|
||||
```bash
|
||||
autorestic cron
|
||||
```
|
||||
|
||||
This command is modtly intended to be triggered by an automated system like systemd or crontab.
|
||||
|
||||
It will run cron jobs es [specified in the cron section](/locations/cron) of a specific location.
|
||||
|
||||
> :ToCPrevNext
|
15
docs/md/cli/exec.md
Normal file
15
docs/md/cli/exec.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Exec
|
||||
|
||||
```bash
|
||||
autorestic exec [-b, --backend] [-a, --all] <command> -- [native options]
|
||||
```
|
||||
|
||||
This is avery handy command which enables you to run any native restic command on desired backends. An example would be listing all the snapshots of all your backends:
|
||||
|
||||
```bash
|
||||
autorestic exec -a -- snapshots
|
||||
```
|
||||
|
||||
With `exec` you can basically run every cli command that you would be able to run with the restic cli. It only prefillst path, key, etc.
|
||||
|
||||
> :ToCPrevNext
|
11
docs/md/cli/forget.md
Normal file
11
docs/md/cli/forget.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Forget
|
||||
|
||||
```bash
|
||||
autorestic forget [-l, --location] [-a, --all] [--dry-run]
|
||||
```
|
||||
|
||||
This will prune and remove old data form the backends according to the [keep policy you have specified for the location](/locations/forget)
|
||||
|
||||
The `--dry-run` flag will do a dry run showing what would have been deleted, but won't touch the actual data.
|
||||
|
||||
> :ToCPrevNext
|
18
docs/md/cli/info.md
Normal file
18
docs/md/cli/info.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# info
|
||||
|
||||
Displays the config file that autorestic is refering to.
|
||||
Usefull when you want to quickly see what locations are being backuped where.
|
||||
|
||||
**Pro tip:** if it gets a bit long you can read it more easily with `autorestic info | less` 😉
|
||||
|
||||
```bash
|
||||
autorestic info
|
||||
```
|
||||
|
||||
## With a custom file
|
||||
|
||||
```bash
|
||||
autorestic -c path/to/some/config.yml info
|
||||
```
|
||||
|
||||
> :ToCPrevNext
|
9
docs/md/cli/install.md
Normal file
9
docs/md/cli/install.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Install
|
||||
|
||||
Installs both restic and autorestic to `/usr/local/bin`.
|
||||
|
||||
```bash
|
||||
autorestic install
|
||||
```
|
||||
|
||||
> :ToCPrevNext
|
17
docs/md/cli/restore.md
Normal file
17
docs/md/cli/restore.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Restore
|
||||
|
||||
```bash
|
||||
autorestic restore [-l, --location] [--from backend] [--to <out dir>]
|
||||
```
|
||||
|
||||
This will restore all the locations to the selected target. If for one location there are more than one backends specified autorestic will take the first one.
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
autorestic restore -l home --from hdd --to /path/where/to/restore
|
||||
```
|
||||
|
||||
This will restore the location `home` to the `/path/where/to/restore` folder and taking the data from the backend `hdd`
|
||||
|
||||
> :ToCPrevNext
|
9
docs/md/cli/uninstall.md
Normal file
9
docs/md/cli/uninstall.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Uninstall
|
||||
|
||||
Installs both restic and autorestic from `/usr/local/bin`.
|
||||
|
||||
```bash
|
||||
autorestic uninstall
|
||||
```
|
||||
|
||||
> :ToCPrevNext
|
11
docs/md/cli/update.md
Normal file
11
docs/md/cli/update.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Update
|
||||
|
||||
Autorestic can update itself! Super handy right? Simply run autorestic update and we will check for you if there are updates for restic and autorestic and install them if necessary.
|
||||
|
||||
```bash
|
||||
autorestic update
|
||||
```
|
||||
|
||||
Updates both restic and autorestic automagically.
|
||||
|
||||
> :ToCPrevNext
|
42
docs/md/config.md
Normal file
42
docs/md/config.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# 🎛 Config File
|
||||
|
||||
## Path
|
||||
|
||||
By default autorestic searches for a `.autorestic.yml` file in the current directory and your home folder.
|
||||
|
||||
- `./.autorestic.yml`
|
||||
- `~/.autorestic.yml`
|
||||
|
||||
You can also specify a custom file with the `-c path/to/some/config.yml`
|
||||
|
||||
> **⚠️ 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!
|
||||
|
||||
## Example configuration
|
||||
|
||||
```yaml | .autorestic.yml
|
||||
locations:
|
||||
home:
|
||||
from: /home/me
|
||||
to: remote
|
||||
|
||||
important:
|
||||
from: /path/to/important/stuff
|
||||
to:
|
||||
- remote
|
||||
- hdd
|
||||
|
||||
backends:
|
||||
remote:
|
||||
type: b2
|
||||
path: 'myBucket:backup/home'
|
||||
B2_ACCOUNT_ID: account_id
|
||||
B2_ACCOUNT_KEY: account_key
|
||||
|
||||
hdd:
|
||||
type: local
|
||||
path: /mnt/my_external_storage
|
||||
```
|
||||
|
||||
> :ToCPrevNext
|
8
docs/md/contrib.md
Normal file
8
docs/md/contrib.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# 🙋♀️🙋♂️ Contributors
|
||||
|
||||
This amazing people helped the project!
|
||||
|
||||
- @ChanceM [Docs]
|
||||
- @EliotBerriot [Docs, Pruning, S3]
|
||||
|
||||
> :ToCPrevNext
|
19
docs/md/examples.md
Normal file
19
docs/md/examples.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# 🐣 Examples
|
||||
|
||||
## List all the snapshots for all the backends
|
||||
|
||||
```bash
|
||||
autorestic -a exec snapshots
|
||||
```
|
||||
|
||||
## Unlock a locked repository
|
||||
|
||||
If you accidentally cancelled a running operation this could be useful.
|
||||
|
||||
Only do this if you know what you are doing.
|
||||
|
||||
```bash
|
||||
autorestic -b my-backend exec unlock
|
||||
```
|
||||
|
||||
> :ToCPrevNext
|
27
docs/md/index.md
Normal file
27
docs/md/index.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# autorestic
|
||||
|
||||
High backup level CLI utility for [restic](https://restic.net/).
|
||||
|
||||
Autorestic is a wrapper around the amazing [restic](https://restic.net/). While being amazing the restic cli can be a bit overwhelming and difficult to manage if you have many different location that you want to backup to multiple locations. This utility is aimed at making this easier 🙂
|
||||
|
||||
<!--  -->
|
||||
|
||||
## ✈️ Roadmap
|
||||
|
||||
~~I would like to make the official `1.0` release in the coming months. Until then please feel free to file issues or feature requests so that the tool is as flexible as possible :)~~
|
||||
|
||||
As of version `0.18` crons are supported wich where the last feature missing for a `1.0`. Will test this for a few weeks and then it's time for the first "real" release! 🎉 Also we now have waaay better docs 📒
|
||||
|
||||
## 🌈 Features
|
||||
|
||||
- YAML config files, no CLI
|
||||
- Incremental -> Minimal space is used
|
||||
- Backup locations to multiple backends
|
||||
- Snapshot policies and pruning
|
||||
- Fully encrypted
|
||||
- Pre/After hooks
|
||||
- Exclude pattern/files
|
||||
- Cron jobs for automatic backup
|
||||
- Backup & Restore docker volumes
|
||||
|
||||
> :ToCPrevNext
|
11
docs/md/installation.md
Normal file
11
docs/md/installation.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# 🛳 Installation
|
||||
|
||||
Linux & macOS. Windows is not supported. If you have problems installing please open an issue :)
|
||||
|
||||
Autorestic requires `curl`, `wget` and `bzip2` to be installed. For most systems these should be already installed.
|
||||
|
||||
```bash
|
||||
curl -s https://raw.githubusercontent.com/CupCakeArmy/autorestic/master/install.sh | bash
|
||||
```
|
||||
|
||||
> :ToCPrevNext
|
47
docs/md/location/cron.md
Normal file
47
docs/md/location/cron.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# Cron
|
||||
|
||||
Often it is usefull to trigger backups autmatically. For this we can specify a `cron` attribute to each location.
|
||||
|
||||
> Available since version 0.18
|
||||
|
||||
```yaml | .autorestic.yml
|
||||
locations:
|
||||
my-location:
|
||||
from: /data
|
||||
to: my-backend
|
||||
cron: '0 3 * * 0' # Every Sunday at 3:00
|
||||
```
|
||||
|
||||
Here is a awesome website with [some examples](https://crontab.guru/examples.html) and an [explorer](https://crontab.guru/)
|
||||
|
||||
## Installing the cron
|
||||
|
||||
**This has to be done only once, regadless of now many cros you have in your config file.**
|
||||
|
||||
To actually enable cron jobs you need something to call `autorestic cron` on a timed shedule.
|
||||
Note that the shedule has nothing to do with the `cron` attribute in each location.
|
||||
My advise would be to trigger the command every 5min, but if you have a cronjob that runs only once a week, it's probably enough to shedule it once a day.
|
||||
|
||||
### Crontab
|
||||
|
||||
Here is an example using crontab, but systemd would do too.
|
||||
|
||||
First, open your crontab in edit mode
|
||||
|
||||
```bash
|
||||
crontab -e
|
||||
```
|
||||
|
||||
Then paste this at the bottom of the file and save it. Note that in this specific example the `.autorestic.yml` is located in `/srv/`. You need to modify that part of course to fit your config file.
|
||||
|
||||
```bash
|
||||
# This is required, as it otherwise cannot find restic as a command.
|
||||
PATH="/usr/local/bin:/usr/bin:/bin"
|
||||
|
||||
# Example running every 5 minutes
|
||||
*/5 * * * * autorestic -c /srv/.autorestic.yml cron
|
||||
```
|
||||
|
||||
Now you can add as many `cron` attributes as you wish ⏱
|
||||
|
||||
> :ToCPrevNext
|
58
docs/md/location/docker.md
Normal file
58
docs/md/location/docker.md
Normal file
@@ -0,0 +1,58 @@
|
||||
# Docker
|
||||
|
||||
autorestic supports docker volumes directly, without needing them to be mounted to the host filesystem.
|
||||
|
||||
> Available since version 0.13
|
||||
|
||||
Let see an example.
|
||||
|
||||
```yaml | docker-compose.yml
|
||||
version: '3.7'
|
||||
|
||||
volumes:
|
||||
data:
|
||||
name: my-data
|
||||
|
||||
services:
|
||||
api:
|
||||
image: alpine
|
||||
volumes:
|
||||
- data:/foo/bar
|
||||
```
|
||||
|
||||
```yaml | .autorestic.yml
|
||||
locations:
|
||||
hello:
|
||||
from: 'volume:my-data'
|
||||
to:
|
||||
- remote
|
||||
options:
|
||||
forget:
|
||||
keep-last: 14 # Useful for limitations explained belowd
|
||||
|
||||
backends:
|
||||
remote: ...
|
||||
```
|
||||
|
||||
Now you can backup and restore as always.
|
||||
|
||||
```bash
|
||||
autorestic -l hello backup
|
||||
```
|
||||
|
||||
```bash
|
||||
autorestic -l hello restore
|
||||
```
|
||||
|
||||
If the volume does not exist on restore, autorestic will create it for you and then fill it with the data.
|
||||
|
||||
## Limitations
|
||||
|
||||
Unfortunately there are some limitations when backing up directly from a docker volume without mounting the volume to the host:
|
||||
|
||||
1. Incremental updates are not possible right now due to how the current docker mounting works. This means that it will take significantely more space.
|
||||
2. Exclude patterns and files also do not work as restic only sees a compressed tarball as source and not the actual data.
|
||||
|
||||
If you are curious or have ideas how to improve this, please [read more here](https://github.com/cupcakearmy/autorestic/issues/4#issuecomment-568771951). Any help is welcomed 🙂
|
||||
|
||||
> :ToCPrevNext
|
20
docs/md/location/exclude.md
Normal file
20
docs/md/location/exclude.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Excluding files
|
||||
|
||||
If you want to exclude certain files or folders it done easily by specifiyng the right flags in the location you desire to filter.
|
||||
|
||||
The flags are taken straight from the [restic cli exclude rules](https://restic.readthedocs.io/en/latest/040_backup.html#excluding-files) so you can use any flag used there.
|
||||
|
||||
```yaml
|
||||
locations:
|
||||
my-location:
|
||||
from: /data
|
||||
to: my-backend
|
||||
options:
|
||||
backup:
|
||||
exclude:
|
||||
- '*.nope'
|
||||
- '*.abc'
|
||||
exclude-file: .gitignore
|
||||
```
|
||||
|
||||
> :ToCPrevNext
|
25
docs/md/location/forget.md
Normal file
25
docs/md/location/forget.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Forget/Prune Policies
|
||||
|
||||
Autorestic supports declaring snapshot policies for location to avoid keeping old snapshot around if you don't need them.
|
||||
|
||||
This is based on [Restic's snapshots policies](https://restic.readthedocs.io/en/latest/060_forget.html#removing-snapshots-according-to-a-policy), and can be enabled for each location as shown below:
|
||||
|
||||
> **Note** This is a full example, of course you also can specify only one of them
|
||||
|
||||
```yaml | .autorestic.yml
|
||||
locations:
|
||||
etc:
|
||||
from: /etc
|
||||
to: local
|
||||
options:
|
||||
forget:
|
||||
keep-last: 5 # always keep at least 5 snapshots
|
||||
keep-hourly: 3 # keep 3 last hourly shapshots
|
||||
keep-daily: 4 # keep 4 last daily shapshots
|
||||
keep-weekly: 1 # keep 1 last weekly shapshots
|
||||
keep-monthly: 12 # keep 12 last monthly shapshots
|
||||
keep-yearly: 7 # keep 7 last yearly shapshots
|
||||
keep-within: '2w' # keep snapshots from the last 2 weeks
|
||||
```
|
||||
|
||||
> :ToCPrevNext
|
18
docs/md/location/hooks.md
Normal file
18
docs/md/location/hooks.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# Hooks
|
||||
|
||||
Sometimes you might want to stop an app/db before backing up data and start the service again after the backup has completed. This is what the hooks are made for. Simply add them to your location config. You can have as many commands as you wish.
|
||||
|
||||
```yml | .autorestic.yml
|
||||
locations:
|
||||
my-location:
|
||||
from: /data
|
||||
to: my-backend
|
||||
hooks:
|
||||
before:
|
||||
- echo "Hello"
|
||||
- echo "Human"
|
||||
after:
|
||||
- echo "kthxbye"
|
||||
```
|
||||
|
||||
> :ToCPrevNext
|
27
docs/md/location/overview.md
Normal file
27
docs/md/location/overview.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# 🗂 Locations
|
||||
|
||||
Locations can be seen as the input to the backup process. Generally this is simply a folder.
|
||||
The paths can be relative from the config file. A location can have multiple backends, so that the data is secured across multiple servers.
|
||||
|
||||
```yaml | .autorestic.yml
|
||||
locations:
|
||||
my-location-name:
|
||||
from: path/to/backup
|
||||
to:
|
||||
- name-of-backend
|
||||
- also-backup-to-this-backend
|
||||
```
|
||||
|
||||
## `from`
|
||||
|
||||
This is the source of the location.
|
||||
|
||||
#### How are paths resolved?
|
||||
|
||||
Paths can be absolute or relative. If relative they are resolved relative to the location of the config file. Tilde `~` paths are also supported for home folder resolution.
|
||||
|
||||
## `to`
|
||||
|
||||
This is einther a single backend or an array of backends. The backends have to be configured in the same config file.
|
||||
|
||||
> :ToCPrevNext
|
8
docs/md/qa.md
Normal file
8
docs/md/qa.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# ❓ QA
|
||||
|
||||
## My config file was moved?
|
||||
|
||||
This happens when autorestic needs to write to the config file. This happend e.g. when we are generating a key for you.
|
||||
Unfortunately during this process formatting and comments are lost. That is why autorestic will place a copy of your old config next to the one we are writing to.
|
||||
|
||||
> :ToCPrevNext
|
72
docs/md/quick.md
Normal file
72
docs/md/quick.md
Normal file
@@ -0,0 +1,72 @@
|
||||
# 🚀 Quickstart
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
curl -s https://raw.githubusercontent.com/CupCakeArmy/autorestic/master/install.sh | bash
|
||||
```
|
||||
|
||||
## Write a simple config file
|
||||
|
||||
```bash
|
||||
vim .autorestic.yml
|
||||
```
|
||||
|
||||
For a quick overview:
|
||||
|
||||
- `locations` can be seen as the inputs and `backends` the output where the data is stored and backed up.
|
||||
- One `location` can have one or multiple `backends` for redudancy.
|
||||
- One `backend` can also be the target for multiple `locations`.
|
||||
- **Backup the config file as it will contain the generated keys**. If you don't have a copy of that keys, the backups are useless as they are encrypted and data will be not recoverable.
|
||||
|
||||
```yaml | .autorestic.yml
|
||||
locations:
|
||||
home:
|
||||
from: /home/me
|
||||
to: remote
|
||||
|
||||
important:
|
||||
from: /path/to/important/stuff
|
||||
to:
|
||||
- remote
|
||||
- hdd
|
||||
|
||||
backends:
|
||||
remote:
|
||||
type: s3
|
||||
path: 's3.amazonaws.com/bucket_name'
|
||||
AWS_ACCESS_KEY_ID: account_id
|
||||
AWS_SECRET_ACCESS_KEY: account_key
|
||||
|
||||
hdd:
|
||||
type: local
|
||||
path: /mnt/my_external_storage
|
||||
```
|
||||
|
||||
## Check
|
||||
|
||||
```bash
|
||||
autorestic check -a
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
## 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
|
63
docs/qa.html
Normal file
63
docs/qa.html
Normal file
@@ -0,0 +1,63 @@
|
||||
<!DOCTYPE html><html><head><title>Autorestic | ❓ QA</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"><meta name="robots" content="index,follow"><meta name="theme-color" content="#212121"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"><link href="https://fonts.googleapis.com/css?family=Hind:400,700&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:300,400&display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined" rel="stylesheet"><style>
|
||||
body, input, button {
|
||||
font-family: 'Hind', sans-serif;
|
||||
}
|
||||
|
||||
code, .hljs {
|
||||
font-family: 'Source Code Pro', 'Courier New', Courier, monospace;
|
||||
}
|
||||
|
||||
.icon-font {
|
||||
font-family: 'Material Icons';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px; /* Preferred icon size */
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: nowrap;
|
||||
direction: ltr;
|
||||
|
||||
/* Support for all WebKit browsers. */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
/* Support for Safari and Chrome. */
|
||||
text-rendering: optimizeLegibility;
|
||||
|
||||
/* Support for Firefox. */
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Support for IE. */
|
||||
font-feature-settings: 'liga';
|
||||
}
|
||||
|
||||
.icon-font.outline {
|
||||
font-family: 'Material Icons Outlined';
|
||||
}
|
||||
</style><link href="/autorestic/./dist/codedoc-styles.css" rel="stylesheet"><script async="" defer="" src="/autorestic/./dist/codedoc-bundle.js"></script></head><body><div class="header-0-0-9"><script async="" defer="" src="https://buttons.github.io/buttons.js"></script><a class="github-button" data-color-scheme="no-preference: light; light: light; dark: dark;" data-icon="false" data-show-count="true" data-size="false" href="https://github.com/cupcakearmy/autorestic/">Star</a><br><br><a class="watermark-0-0-8" href="https://github.com/CONNECT-platform/codedoc" target="_blank">Created With<svg viewBox="0 0 536 296" version="1.1" xmlns="http://www.w3.org/2000/svg"><g id="codedoc" transform="translate(-244.000000, -364.000000)" fill-rule="nonzero"><path d="M580,532 C615.346224,532 644,560.653776 644,596 C644,631.346224 615.346224,660 580,660 C544.653776,660 516,631.346224 516,596 C516,560.653776 544.653776,532 580,532 Z M716,532 C751.346224,532 780,560.653776 780,596 C780,631.346224 751.346224,660 716,660 L692,660 C687.581722,660 684,656.418278 684,652 C684,647.581722 687.581722,644 692,644 L716,644 C742.509668,644 764,622.509668 764,596 C764,569.490332 742.509668,548 716,548 L692,548 C687.581722,548 684,544.418278 684,540 C684,535.581722 687.581722,532 692,532 L716,532 Z M468,532 C472.418278,532 476,535.581722 476,540 L476,652 C476,656.418278 472.418278,660 468,660 L444,660 C408.653776,660 380,631.346224 380,596 C380,560.653776 408.653776,532 444,532 L468,532 Z M332,532 C336.418278,532 340,535.581722 340,540 L340,652 C340,656.418278 336.418278,660 332,660 L252,660 C247.581722,660 244,656.418278 244,652 L244,540 C244,535.581722 247.581722,532 252,532 L332,532 Z M580,548 C553.490332,548 532,569.490332 532,596 C532,622.509668 553.490332,644 580,644 C606.509668,644 628,622.509668 628,596 C628,569.490332 606.509668,548 580,548 Z M461,548 L444,548 C417.490332,548 396,569.490332 396,596 C396,622.509668 417.490332,644 444,644 L461,644 L461,548 Z M444,364 C479.346224,364 508,392.653776 508,428 C508,463.346224 479.346224,492 444,492 C408.653776,492 380,463.346224 380,428 C380,392.653776 408.653776,364 444,364 Z M332,364 C336.418278,364 340,367.581722 340,372 C340,376.418278 336.418278,380 332,380 L308,380 C281.490332,380 260,401.490332 260,428 C260,454.509668 281.490332,476 308,476 L332,476 C336.418278,476 340,479.581722 340,484 C340,488.418278 336.418278,492 332,492 L308,492 C272.653776,492 244,463.346224 244,428 C244,392.653776 272.653776,364 308,364 L332,364 Z M580,364 C615.346224,364 644,392.653776 644,428 C644,463.346224 615.346224,492 580,492 L556,492 C551.581722,492 548,488.418278 548,484 L548,372 C548,367.581722 551.581722,364 556,364 L580,364 Z M772,364 C776.418278,364 780,367.581722 780,372 C780,376.418278 776.418278,380 772,380 L700,380 L700,420 L772,420 C776.418278,420 780,423.581722 780,428 C780,432.418278 776.418278,436 772,436 L700,436 L700,476 L772,476 C776.418278,476 780,479.581722 780,484 C780,488.418278 776.418278,492 772,492 L692,492 C687.581722,492 684,488.418278 684,484 L684,372 C684,367.581722 687.581722,364 692,364 L772,364 Z M444,380 C417.490332,380 396,401.490332 396,428 C396,454.509668 417.490332,476 444,476 C470.509668,476 492,454.509668 492,428 C492,401.490332 470.509668,380 444,380 Z M580,380 L563,380 L563,476 L580,476 C606.509668,476 628,454.509668 628,428 C628,401.490332 606.509668,380 580,380 Z"></path></g></svg></a></div><div id="-codedoc-container" class="container"><h1 id="❓-qa" class="heading-0-0-1"><span class="anchor-0-0-2" data-ignore-text=""><span class="icon-font" data-ignore-text="" style="vertical-align: sub">link</span></span>❓ QA</h1><h2 id="my-config-file-was-moved" class="heading-0-0-1"><span class="anchor-0-0-2" data-ignore-text=""><span class="icon-font" data-ignore-text="" style="vertical-align: sub">link</span></span>My config file was moved?</h2><p>This happens when autorestic needs to write to the config file. This happend e.g. when we are generating a key for you.
|
||||
Unfortunately during this process formatting and comments are lost. That is why autorestic will place a copy of your old config next to the one we are writing to.</p><script id="hosVknLqnx">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("hosVknLqnx", "qcaKEY878Mn2dFQW/lSrDg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="contentnav-0-0-14" data-no-search=""><a href="#❓-qa" class="h1" data-content-highlight="❓-qa">❓ QA</a><a href="#my-config-file-was-moved" class="h2" data-content-highlight="my-config-file-was-moved">My config file was moved?</a></div></div><div id="-codedoc-toc" class="toc-0-0-11"><script>
|
||||
if (window.matchMedia('(min-width: 1200px)').matches) {
|
||||
if (!localStorage.getItem('-codedoc-toc-active')) {
|
||||
localStorage.setItem('-codedoc-toc-active', "true");
|
||||
}
|
||||
}
|
||||
</script><div class="content-0-0-12"><p><a href="/autorestic/">Home</a>
|
||||
<a href="/autorestic/quick">Quick Start</a>
|
||||
<a href="/autorestic/installation">Installation</a>
|
||||
<a href="/autorestic/config">Configuration</a></p><div class="collapse-0-0-7 "><script id="kEQrpmZndd">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("kEQrpmZndd", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">Locations</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/location/overview">Overview</a>
|
||||
<a href="/autorestic/location/hooks">Hooks</a>
|
||||
<a href="/autorestic/location/exclude">Excluding Files</a>
|
||||
<a href="/autorestic/location/forget">Forget Policy</a>
|
||||
<a href="/autorestic/location/cron">Cron</a>
|
||||
<a href="/autorestic/location/docker">Docker Volumes</a></p></div></div><div class="collapse-0-0-7 "><script id="WoIG_dbAcb">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("WoIG_dbAcb", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">Backend</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/backend/overview">Overview</a>
|
||||
<a href="/autorestic/backend/available">Available Backends</a></p></div></div><div class="collapse-0-0-7 "><script id="CQT_RzXKLL">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("CQT_RzXKLL", "fz894w7KG2/tX4kLbbA1Kg==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script><div class="label" onclick="this.parentElement.classList.toggle('open')"><span class="text">CLI</span><span class="icon-font closed">chevron_right</span></div><div class="content"><p><a href="/autorestic/cli/info">Info</a>
|
||||
<a href="/autorestic/cli/check">Check</a>
|
||||
<a href="/autorestic/cli/backup">Backup</a>
|
||||
<a href="/autorestic/cli/restore">Restore</a>
|
||||
<a href="/autorestic/cli/forget">Forget</a>
|
||||
<a href="/autorestic/cli/cron">Cron</a>
|
||||
<a href="/autorestic/cli/exec">Exec</a>
|
||||
<a href="/autorestic/cli/install">Install</a>
|
||||
<a href="/autorestic/cli/uninstall">Uninstall</a>
|
||||
<a href="/autorestic/cli/update">Update</a></p></div></div><p><a href="/autorestic/examples">Examples</a></p><p><a href="/autorestic/qa">QA</a></p><p><a href="/autorestic/contrib">Contributors</a></p></div><div class="search-0-0-13"><script id="bktbIEFadt">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("bktbIEFadt", "+SrlfVhZ/PRQ5WhUlZbTaA==", {"repo":"autorestic","user":"cupcakearmy","root":"docs/md","pick":"\\.md$","drop":"(^_)|(\\/_)"});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div></div><div class="footer-0-0-10"><div class="left"><script id="GENUEkHIVx">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("GENUEkHIVx", "XsNW3ht5ee+RmVUActEo9g==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div><div class="main"><div class="inside"><a href="https://github.com/cupcakearmy/autorestic/" target="_blank">GitHub</a></div></div><div class="right"><script id="YkUMjnXlqP">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("YkUMjnXlqP", "Y1WWvCKxkgk1yh8xbCfXqw==", {});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></div></div><script id="LTyNTrfhtS">(function(){function load(){if (window.__sdh_transport){window.__sdh_transport("LTyNTrfhtS", "v641FmLj+AeGp0uuFTI6ug==", {"namespace":"/autorestic"});} }; if (document.readyState == 'complete') load(); else window.addEventListener('load', load); })()</script></body></html>
|
62
docs/quick.html
Normal file
62
docs/quick.html
Normal file
File diff suppressed because one or more lines are too long
27
package.json
27
package.json
@@ -4,22 +4,27 @@
|
||||
"build": "tsc",
|
||||
"build:watch": "tsc -w",
|
||||
"dev": "tsnd --no-notify --respawn ./src/autorestic.ts",
|
||||
"bin": "yarn run build && pkg lib/autorestic.js --targets latest-macos-x64,latest-linux-x64 --out-path bin"
|
||||
"move": "mv bin/autorestic-linux bin/autorestic_linux_x64 && mv bin/autorestic-macos bin/autorestic_macos_x64",
|
||||
"bin": "yarn run build && pkg lib/autorestic.js --targets latest-macos-x64,latest-linux-x64 --out-path bin && yarn run move",
|
||||
"docs:build": "codedoc build",
|
||||
"docs:dev": "codedoc serve"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/js-yaml": "^3.12.1",
|
||||
"@types/minimist": "^1.2.0",
|
||||
"@types/node": "^12.11.7",
|
||||
"pkg": "^4.4.0",
|
||||
"@codedoc/cli": "0.2.x",
|
||||
"@types/js-yaml": "3.x.x",
|
||||
"@types/minimist": "1.x.x",
|
||||
"@types/node": "14.x.x",
|
||||
"pkg": "4.4.x",
|
||||
"ts-node-dev": "^1.0.0-pre.40",
|
||||
"typescript": "^3.7"
|
||||
"typescript": "3.9.x"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^0.19.0",
|
||||
"axios": "0.19.x",
|
||||
"clitastic": "0.0.1",
|
||||
"colors": "^1.3.3",
|
||||
"js-yaml": "^3.13.1",
|
||||
"minimist": "^1.2.0",
|
||||
"uhrwerk": "^1.0.0"
|
||||
"colors": "1.x.x",
|
||||
"cron-parser": "2.x.x",
|
||||
"js-yaml": "3.x.x",
|
||||
"minimist": "1.x.x",
|
||||
"uhrwerk": "1.x.x"
|
||||
}
|
||||
}
|
||||
|
@@ -3,11 +3,12 @@ import minimist from 'minimist'
|
||||
|
||||
import { init } from './config'
|
||||
import handlers, { error, help } from './handlers'
|
||||
import { Config } from './types'
|
||||
import { readLock, writeLock, unlock } from './lock'
|
||||
|
||||
|
||||
|
||||
process.on('uncaughtException', err => {
|
||||
process.on('uncaughtException', (err) => {
|
||||
console.log(err.message)
|
||||
unlock()
|
||||
process.exit(1)
|
||||
})
|
||||
|
||||
@@ -25,20 +26,38 @@ export const { _: commands, ...flags } = minimist(process.argv.slice(2), {
|
||||
string: ['l', 'b'],
|
||||
})
|
||||
|
||||
export const VERSION = '0.11'
|
||||
export const VERSION = '0.20'
|
||||
export const INSTALL_DIR = '/usr/local/bin'
|
||||
export const VERBOSE = flags.verbose
|
||||
|
||||
export const config = init()
|
||||
export let config: Config
|
||||
|
||||
async function main() {
|
||||
config = init()
|
||||
|
||||
function main() {
|
||||
if (commands.length < 1) return help()
|
||||
// Don't let 2 instances run on the same config
|
||||
const lock = readLock()
|
||||
if (lock.running) {
|
||||
console.log('An instance of autorestic is already running for this config file'.red)
|
||||
return
|
||||
}
|
||||
writeLock({
|
||||
...lock,
|
||||
running: true,
|
||||
})
|
||||
|
||||
// For dev
|
||||
// return await handlers['cron']([], { ...flags, all: true })
|
||||
|
||||
if (commands.length < 1 || commands[0] === 'help') return help()
|
||||
|
||||
const command: string = commands[0]
|
||||
const args: string[] = commands.slice(1)
|
||||
;(handlers[command] || error)(args, flags)
|
||||
|
||||
const fn = handlers[command] || error
|
||||
await fn(args, flags)
|
||||
}
|
||||
|
||||
|
||||
main()
|
||||
.catch((e: Error) => console.error(e.message))
|
||||
.finally(unlock)
|
||||
|
@@ -2,7 +2,7 @@ import { Writer } from 'clitastic'
|
||||
|
||||
import { config, VERBOSE } from './autorestic'
|
||||
import { Backend, Backends, Locations } from './types'
|
||||
import { exec, ConfigError } from './utils'
|
||||
import { exec, pathRelativeToConfigFile, filterObjectByKey } from './utils'
|
||||
|
||||
|
||||
|
||||
@@ -11,15 +11,14 @@ const ALREADY_EXISTS = /(?=.*already)(?=.*config).*/
|
||||
export const getPathFromBackend = (backend: Backend): string => {
|
||||
switch (backend.type) {
|
||||
case 'local':
|
||||
return backend.path
|
||||
return pathRelativeToConfigFile(backend.path)
|
||||
case 'b2':
|
||||
case 'azure':
|
||||
case 'gs':
|
||||
case 's3':
|
||||
return `${backend.type}:${backend.path}`
|
||||
case 'sftp':
|
||||
case 'rest':
|
||||
throw new Error(`Unsupported backend type: "${backend.type}"`)
|
||||
return `${backend.type}:${backend.path}`
|
||||
default:
|
||||
throw new Error(`Unknown backend type.`)
|
||||
}
|
||||
@@ -43,6 +42,7 @@ export const getBackendsFromLocations = (locations: Locations): string[] => {
|
||||
|
||||
export const checkAndConfigureBackend = (name: string, backend: Backend) => {
|
||||
const writer = new Writer(name.blue + ' : ' + 'Configuring... ⏳')
|
||||
try {
|
||||
const env = getEnvFromBackend(backend)
|
||||
|
||||
const { out, err } = exec('restic', ['init'], { env })
|
||||
@@ -53,15 +53,22 @@ export const checkAndConfigureBackend = (name: string, backend: Backend) => {
|
||||
if (VERBOSE && out.length > 0) console.log(out)
|
||||
|
||||
writer.done(name.blue + ' : ' + 'Done ✓'.green)
|
||||
} catch (e) {
|
||||
writer.done(name.blue + ' : ' + 'Error ⚠️ ' + e.message.red)
|
||||
}
|
||||
}
|
||||
|
||||
export const checkAndConfigureBackends = (backends?: Backends) => {
|
||||
if (!backends) {
|
||||
if (!config) throw ConfigError
|
||||
if (!backends)
|
||||
backends = config.backends
|
||||
}
|
||||
|
||||
console.log('\nConfiguring Backends'.grey.underline)
|
||||
for (const [name, backend] of Object.entries(backends))
|
||||
checkAndConfigureBackend(name, backend)
|
||||
}
|
||||
|
||||
export const checkAndConfigureBackendsForLocations = (locations: Locations) => {
|
||||
checkAndConfigureBackends(
|
||||
filterObjectByKey(config.backends, getBackendsFromLocations(locations)),
|
||||
)
|
||||
}
|
||||
|
@@ -1,36 +1,81 @@
|
||||
import { Writer } from 'clitastic'
|
||||
import { mkdirSync } from 'fs'
|
||||
|
||||
import { config, VERBOSE } from './autorestic'
|
||||
import { getEnvFromBackend } from './backend'
|
||||
import { Locations, Location } from './types'
|
||||
import { LocationFromPrefixes } from './config'
|
||||
import { Locations, Location, Backend } from './types'
|
||||
import {
|
||||
exec,
|
||||
ConfigError,
|
||||
pathRelativeToConfigFile,
|
||||
getFlagsFromLocation,
|
||||
makeArrayIfIsNot,
|
||||
execPlain,
|
||||
MeasureDuration, fill,
|
||||
MeasureDuration,
|
||||
fill,
|
||||
decodeLocationFromPrefix,
|
||||
checkIfDockerVolumeExistsOrFail,
|
||||
getPathFromVolume,
|
||||
} from './utils'
|
||||
|
||||
|
||||
|
||||
export const backupFromFilesystem = (from: string, location: Location, backend: Backend, tags?: string[]) => {
|
||||
const path = pathRelativeToConfigFile(from)
|
||||
|
||||
const { out, err, status } = exec(
|
||||
'restic',
|
||||
['backup', '.', ...getFlagsFromLocation(location, 'backup')],
|
||||
{ env: getEnvFromBackend(backend), cwd: path },
|
||||
)
|
||||
|
||||
if (VERBOSE) console.log(out, err)
|
||||
if (status != 0 || err.length > 0)
|
||||
throw new Error(err)
|
||||
}
|
||||
|
||||
export const backupFromVolume = (volume: string, location: Location, backend: Backend) => {
|
||||
const tmp = getPathFromVolume(volume)
|
||||
try {
|
||||
mkdirSync(tmp)
|
||||
checkIfDockerVolumeExistsOrFail(volume)
|
||||
|
||||
// For incremental backups. Unfortunately due to how the docker mounts work the permissions get lost.
|
||||
// execPlain(`docker run --rm -v ${volume}:/data -v ${tmp}:/backup alpine cp -aT /data /backup`)
|
||||
execPlain(`docker run --rm -v ${volume}:/data -v ${tmp}:/backup alpine tar cf /backup/archive.tar -C /data .`)
|
||||
|
||||
backupFromFilesystem(tmp, location, backend)
|
||||
} catch (e) {
|
||||
throw e
|
||||
} finally {
|
||||
execPlain(`rm -rf ${tmp}`)
|
||||
}
|
||||
}
|
||||
|
||||
export const backupSingle = (name: string, to: string, location: Location) => {
|
||||
if (!config) throw ConfigError
|
||||
const delta = new MeasureDuration()
|
||||
const writer = new Writer(name + to.blue + ' : ' + 'Backing up... ⏳')
|
||||
|
||||
try {
|
||||
const backend = config.backends[to]
|
||||
const path = pathRelativeToConfigFile(location.from)
|
||||
const [type, value] = decodeLocationFromPrefix(location.from)
|
||||
|
||||
const cmd = exec(
|
||||
'restic',
|
||||
['backup', path, ...getFlagsFromLocation(location, 'backup')],
|
||||
{ env: getEnvFromBackend(backend) },
|
||||
)
|
||||
switch (type) {
|
||||
|
||||
case LocationFromPrefixes.Filesystem:
|
||||
backupFromFilesystem(value, location, backend)
|
||||
break
|
||||
|
||||
case LocationFromPrefixes.DockerVolume:
|
||||
backupFromVolume(value, location, backend)
|
||||
break
|
||||
|
||||
}
|
||||
|
||||
if (VERBOSE) console.log(cmd.out, cmd.err)
|
||||
writer.done(`${name}${to.blue} : ${'Done ✓'.green} (${delta.finished(true)})`)
|
||||
} catch (e) {
|
||||
writer.done(`${name}${to.blue} : ${'Failed!'.red} (${delta.finished(true)}) ${e.message}`)
|
||||
}
|
||||
}
|
||||
|
||||
export const backupLocation = (name: string, location: Location) => {
|
||||
@@ -40,8 +85,8 @@ export const backupLocation = (name: string, location: Location) => {
|
||||
|
||||
if (location.hooks && location.hooks.before)
|
||||
for (const command of makeArrayIfIsNot(location.hooks.before)) {
|
||||
const cmd = execPlain(command)
|
||||
if (cmd) console.log(cmd.out, cmd.err)
|
||||
const cmd = execPlain(command, {})
|
||||
console.log(cmd.out, cmd.err)
|
||||
}
|
||||
|
||||
for (const t of makeArrayIfIsNot(location.to)) {
|
||||
@@ -52,15 +97,13 @@ export const backupLocation = (name: string, location: Location) => {
|
||||
if (location.hooks && location.hooks.after)
|
||||
for (const command of makeArrayIfIsNot(location.hooks.after)) {
|
||||
const cmd = execPlain(command)
|
||||
if (cmd) console.log(cmd.out, cmd.err)
|
||||
console.log(cmd.out, cmd.err)
|
||||
}
|
||||
}
|
||||
|
||||
export const backupAll = (locations?: Locations) => {
|
||||
if (!locations) {
|
||||
if (!config) throw ConfigError
|
||||
if (!locations)
|
||||
locations = config.locations
|
||||
}
|
||||
|
||||
console.log('\nBacking Up'.underline.grey)
|
||||
for (const [name, location] of Object.entries(locations))
|
||||
|
@@ -1,89 +1,105 @@
|
||||
import { readFileSync, writeFileSync, statSync } from 'fs'
|
||||
import { readFileSync, writeFileSync, statSync, copyFileSync } from 'fs'
|
||||
import { resolve } from 'path'
|
||||
import { homedir } from 'os'
|
||||
|
||||
import yaml from 'js-yaml'
|
||||
import CronParser from 'cron-parser'
|
||||
|
||||
import { flags } from './autorestic'
|
||||
import { Backend, Config } from './types'
|
||||
import { makeArrayIfIsNot, makeObjectKeysLowercase, rand } from './utils'
|
||||
import { homedir } from 'os'
|
||||
|
||||
|
||||
export enum LocationFromPrefixes {
|
||||
Filesystem,
|
||||
DockerVolume,
|
||||
}
|
||||
|
||||
export const normalizeAndCheckBackends = (config: Config) => {
|
||||
config.backends = makeObjectKeysLowercase(config.backends)
|
||||
|
||||
for (const [name, { type, path, key, ...rest }] of Object.entries(
|
||||
config.backends,
|
||||
)) {
|
||||
if (!type || !path)
|
||||
throw new Error(
|
||||
`The backend "${name}" is missing some required attributes`,
|
||||
)
|
||||
for (const [name, { type, path, key, ...rest }] of Object.entries(config.backends)) {
|
||||
if (!type || !path) throw new Error(`The backend "${name}" is missing some required attributes`)
|
||||
|
||||
const tmp: any = {
|
||||
type,
|
||||
path,
|
||||
key: key || rand(128),
|
||||
}
|
||||
for (const [key, value] of Object.entries(rest))
|
||||
tmp[key.toUpperCase()] = value
|
||||
for (const [key, value] of Object.entries(rest)) tmp[key.toUpperCase()] = value
|
||||
|
||||
config.backends[name] = tmp as Backend
|
||||
}
|
||||
}
|
||||
|
||||
export const normalizeAndCheckBackups = (config: Config) => {
|
||||
export const normalizeAndCheckLocations = (config: Config) => {
|
||||
config.locations = makeObjectKeysLowercase(config.locations)
|
||||
const backends = Object.keys(config.backends)
|
||||
|
||||
const checkDestination = (backend: string, backup: string) => {
|
||||
if (!backends.includes(backend))
|
||||
throw new Error(`Cannot find the backend "${backend}" for "${backup}"`)
|
||||
const checkDestination = (backend: string, location: string) => {
|
||||
if (!backends.includes(backend)) throw new Error(`Cannot find the backend "${backend}" for "${location}"`)
|
||||
}
|
||||
|
||||
for (const [name, { from, to, ...rest }] of Object.entries(
|
||||
config.locations,
|
||||
)) {
|
||||
if (!from || !to)
|
||||
throw new Error(
|
||||
`The backup "${name}" is missing some required attributes`,
|
||||
)
|
||||
for (const [name, { from, to, cron, ...rest }] of Object.entries(config.locations)) {
|
||||
if (!from) throw new Error(`The location "${name.blue}" is missing the "${'from'.underline.red}" source folder. See https://git.io/Jf0xw`)
|
||||
if (!to || (Array.isArray(to) && !to.length))
|
||||
throw new Error(`The location "${name.blue}" has no backend "${'to'.underline.red}" to save the backups. See https://git.io/Jf0xw`)
|
||||
|
||||
for (const t of makeArrayIfIsNot(to))
|
||||
checkDestination(t, name)
|
||||
for (const t of makeArrayIfIsNot(to)) checkDestination(t, name)
|
||||
|
||||
if (cron) {
|
||||
try {
|
||||
CronParser.parseExpression(cron)
|
||||
} catch {
|
||||
throw new Error(`The location "${name.blue}" has an invalid ${'cron'.underline.red} entry. See https://git.io/Jf0xP`)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const findConfigFile = (): string | undefined => {
|
||||
const findConfigFile = (): string => {
|
||||
const config = '.autorestic.yml'
|
||||
const paths = [
|
||||
resolve(flags.config || ''),
|
||||
resolve('./' + config),
|
||||
homedir() + '/' + config,
|
||||
]
|
||||
const paths = [resolve(flags.config || ''), resolve('./' + config), homedir() + '/' + config]
|
||||
for (const path of paths) {
|
||||
try {
|
||||
const file = statSync(path)
|
||||
if (file.isFile()) return path
|
||||
} catch (e) {
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
throw new Error('Config file not found')
|
||||
}
|
||||
|
||||
export let CONFIG_FILE: string = ''
|
||||
|
||||
export const init = (): Config | undefined => {
|
||||
export const init = (): Config => {
|
||||
const file = findConfigFile()
|
||||
if (file) CONFIG_FILE = file
|
||||
else return
|
||||
CONFIG_FILE = file
|
||||
|
||||
const raw: Config = makeObjectKeysLowercase(
|
||||
yaml.safeLoad(readFileSync(CONFIG_FILE).toString()),
|
||||
)
|
||||
const parsed = yaml.safeLoad(readFileSync(CONFIG_FILE).toString())
|
||||
if (!parsed || typeof parsed === 'string') throw new Error('Could not parse the config file')
|
||||
const raw: Config = makeObjectKeysLowercase(parsed)
|
||||
|
||||
const current = JSON.stringify(raw)
|
||||
|
||||
normalizeAndCheckBackends(raw)
|
||||
normalizeAndCheckBackups(raw)
|
||||
normalizeAndCheckLocations(raw)
|
||||
|
||||
const changed = JSON.stringify(raw) !== current
|
||||
|
||||
if (changed) {
|
||||
const OLD_CONFIG_FILE = CONFIG_FILE + '.old'
|
||||
copyFileSync(CONFIG_FILE, OLD_CONFIG_FILE)
|
||||
writeFileSync(CONFIG_FILE, yaml.safeDump(raw))
|
||||
console.log(
|
||||
'\n' +
|
||||
'⚠️ MOVED OLD CONFIG FILE TO: ⚠️'.red.underline.bold +
|
||||
'\n' +
|
||||
OLD_CONFIG_FILE +
|
||||
'\n' +
|
||||
'What? Why? '.grey +
|
||||
'https://git.io/Jf0xK'.underline.grey +
|
||||
'\n'
|
||||
)
|
||||
}
|
||||
|
||||
return raw
|
||||
}
|
||||
|
33
src/cron.ts
Normal file
33
src/cron.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import CronParser from 'cron-parser'
|
||||
|
||||
import { config } from './autorestic'
|
||||
import { checkAndConfigureBackendsForLocations } from './backend'
|
||||
import { Location } from './types'
|
||||
import { backupLocation } from './backup'
|
||||
import { readLock, writeLock } from './lock'
|
||||
|
||||
|
||||
const runCronForLocation = (name: string, location: Location) => {
|
||||
const lock = readLock()
|
||||
const parsed = CronParser.parseExpression(location.cron || '')
|
||||
const last = parsed.prev()
|
||||
|
||||
if (!lock.crons[name] || last.toDate().getTime() > lock.crons[name].lastRun) {
|
||||
backupLocation(name, location)
|
||||
lock.crons[name] = { lastRun: Date.now() }
|
||||
writeLock(lock)
|
||||
} else {
|
||||
console.log(`${name.yellow} ▶ Skipping. Sheduled for: ${parsed.next().toString().underline.blue}`)
|
||||
}
|
||||
}
|
||||
|
||||
export const runCron = () => {
|
||||
const locationsWithCron = Object.entries(config.locations).filter(([name, { cron }]) => !!cron)
|
||||
checkAndConfigureBackendsForLocations(Object.fromEntries(locationsWithCron))
|
||||
|
||||
console.log('\nRunning cron jobs'.underline.gray)
|
||||
for (const [name, location] of locationsWithCron)
|
||||
runCronForLocation(name, location)
|
||||
|
||||
console.log('\nFinished!'.underline + ' 🎉')
|
||||
}
|
@@ -2,29 +2,38 @@ import { Writer } from 'clitastic'
|
||||
|
||||
import { config, VERBOSE } from './autorestic'
|
||||
import { getEnvFromBackend } from './backend'
|
||||
import { LocationFromPrefixes } from './config'
|
||||
import { Locations, Location, Flags } from './types'
|
||||
import {
|
||||
exec,
|
||||
ConfigError,
|
||||
pathRelativeToConfigFile,
|
||||
getFlagsFromLocation,
|
||||
makeArrayIfIsNot,
|
||||
fill,
|
||||
fill, decodeLocationFromPrefix, getPathFromVolume,
|
||||
} from './utils'
|
||||
|
||||
|
||||
|
||||
export const forgetSingle = (name: string, to: string, location: Location, dryRun: boolean) => {
|
||||
if (!config) throw ConfigError
|
||||
const base = name + to.blue + ' : '
|
||||
const writer = new Writer(base + 'Removing old snapshots… ⏳')
|
||||
|
||||
const backend = config.backends[to]
|
||||
const path = pathRelativeToConfigFile(location.from)
|
||||
const flags = getFlagsFromLocation(location, 'forget')
|
||||
|
||||
const [type, value] = decodeLocationFromPrefix(location.from)
|
||||
let path: string
|
||||
switch (type) {
|
||||
case LocationFromPrefixes.Filesystem:
|
||||
path = pathRelativeToConfigFile(value)
|
||||
break
|
||||
case LocationFromPrefixes.DockerVolume:
|
||||
path = getPathFromVolume(value)
|
||||
break
|
||||
}
|
||||
|
||||
if (flags.length == 0) {
|
||||
writer.done(base + 'skipping, no policy declared')
|
||||
writer.done(base + 'Skipping, no policy declared')
|
||||
return
|
||||
}
|
||||
if (dryRun) flags.push('--dry-run')
|
||||
@@ -53,7 +62,6 @@ export const forgetLocation = (name: string, backup: Location, dryRun: boolean)
|
||||
}
|
||||
|
||||
export const forgetAll = (backups?: Locations, flags?: Flags) => {
|
||||
if (!config) throw ConfigError
|
||||
if (!backups) {
|
||||
backups = config.locations
|
||||
}
|
||||
|
@@ -1,14 +1,17 @@
|
||||
import axios from 'axios'
|
||||
import { Writer } from 'clitastic'
|
||||
import { unlinkSync } from 'fs'
|
||||
import { chmodSync, renameSync, unlinkSync } from 'fs'
|
||||
import { tmpdir } from 'os'
|
||||
import { join, resolve } from 'path'
|
||||
|
||||
import axios from 'axios'
|
||||
import { Writer } from 'clitastic'
|
||||
|
||||
import { config, INSTALL_DIR, VERSION } from './autorestic'
|
||||
import { checkAndConfigureBackends, getBackendsFromLocations, getEnvFromBackend } from './backend'
|
||||
import { checkAndConfigureBackends, getEnvFromBackend, checkAndConfigureBackendsForLocations } from './backend'
|
||||
import { backupAll } from './backup'
|
||||
import { runCron } from './cron'
|
||||
import { forgetAll } from './forget'
|
||||
import showAll from './info'
|
||||
import { restoreSingle } from './restore'
|
||||
import { Backends, Flags, Locations } from './types'
|
||||
import {
|
||||
checkIfCommandIsAvailable,
|
||||
@@ -16,7 +19,7 @@ import {
|
||||
downloadFile,
|
||||
exec,
|
||||
filterObjectByKey,
|
||||
ConfigError, makeArrayIfIsNot,
|
||||
makeArrayIfIsNot,
|
||||
} from './utils'
|
||||
|
||||
|
||||
@@ -26,7 +29,6 @@ export type Handlers = {
|
||||
}
|
||||
|
||||
const parseBackend = (flags: Flags): Backends => {
|
||||
if (!config) throw ConfigError
|
||||
if (!flags.all && !flags.backend)
|
||||
throw new Error(
|
||||
'No backends specified.'.red +
|
||||
@@ -44,7 +46,6 @@ const parseBackend = (flags: Flags): Backends => {
|
||||
}
|
||||
|
||||
const parseLocations = (flags: Flags): Locations => {
|
||||
if (!config) throw ConfigError
|
||||
if (!flags.all && !flags.location)
|
||||
throw new Error(
|
||||
'No locations specified.'.red +
|
||||
@@ -70,60 +71,31 @@ const handlers: Handlers = {
|
||||
checkAndConfigureBackends(backends)
|
||||
},
|
||||
backup(args, flags) {
|
||||
if (!config) throw ConfigError
|
||||
checkIfResticIsAvailable()
|
||||
const locations: Locations = parseLocations(flags)
|
||||
|
||||
checkAndConfigureBackends(
|
||||
filterObjectByKey(config.backends, getBackendsFromLocations(locations)),
|
||||
)
|
||||
checkAndConfigureBackendsForLocations(locations)
|
||||
backupAll(locations)
|
||||
|
||||
console.log('\nFinished!'.underline + ' 🎉')
|
||||
},
|
||||
restore(args, flags) {
|
||||
if (!config) throw ConfigError
|
||||
cron(args, flags) {
|
||||
checkIfResticIsAvailable()
|
||||
runCron()
|
||||
},
|
||||
restore(args, flags) {
|
||||
checkIfResticIsAvailable()
|
||||
|
||||
if (!flags.to) {
|
||||
console.log(`You need to specify the restore path with --to`.red)
|
||||
return
|
||||
}
|
||||
|
||||
const locations = parseLocations(flags)
|
||||
for (const [name, location] of Object.entries(locations)) {
|
||||
const baseText = name.green + '\t\t'
|
||||
const w = new Writer(baseText + `Starting...`)
|
||||
const keys = Object.keys(locations)
|
||||
if (keys.length < 1) throw new Error(`You need to specify the location to restore with --location`.red)
|
||||
if (keys.length > 2) throw new Error(`Only one location is supported at a time when restoring`.red)
|
||||
|
||||
let backend: string = Array.isArray(location.to) ? location.to[0] : location.to
|
||||
if (flags.from) {
|
||||
if (!location.to.includes(flags.from)) {
|
||||
w.done(baseText + `Backend ${flags.from} is not a valid location for ${name}`.red)
|
||||
continue
|
||||
}
|
||||
backend = flags.from
|
||||
w.replaceLn(baseText + `Restoring from ${backend.blue}...`)
|
||||
} else if (Array.isArray(location.to) && location.to.length > 1) {
|
||||
w.replaceLn(baseText + `Restoring from ${backend.blue}...\tTo select a specific backend pass the ${'--from'.blue} flag`)
|
||||
}
|
||||
const env = getEnvFromBackend(config.backends[backend])
|
||||
|
||||
exec(
|
||||
'restic',
|
||||
['restore', 'latest', '--path', resolve(location.from), '--target', flags.to],
|
||||
{ env },
|
||||
)
|
||||
w.done(name.green + '\t\tDone 🎉')
|
||||
}
|
||||
restoreSingle(keys[0], flags.from, flags.to)
|
||||
},
|
||||
forget(args, flags) {
|
||||
if (!config) throw ConfigError
|
||||
checkIfResticIsAvailable()
|
||||
const locations: Locations = parseLocations(flags)
|
||||
|
||||
checkAndConfigureBackends(
|
||||
filterObjectByKey(config.backends, getBackendsFromLocations(locations)),
|
||||
)
|
||||
checkAndConfigureBackendsForLocations(locations)
|
||||
forgetAll(locations, flags)
|
||||
|
||||
console.log('\nFinished!'.underline + ' 🎉')
|
||||
@@ -139,7 +111,7 @@ const handlers: Handlers = {
|
||||
console.log(out, err)
|
||||
}
|
||||
},
|
||||
async info() {
|
||||
info() {
|
||||
showAll()
|
||||
},
|
||||
async install() {
|
||||
@@ -147,7 +119,7 @@ const handlers: Handlers = {
|
||||
checkIfResticIsAvailable()
|
||||
console.log('Restic is already installed')
|
||||
return
|
||||
} catch (e) {
|
||||
} catch {
|
||||
}
|
||||
|
||||
const w = new Writer('Checking latest version... ⏳')
|
||||
@@ -164,9 +136,7 @@ const handlers: Handlers = {
|
||||
}
|
||||
|
||||
w.replaceLn('Downloading binary... 🌎')
|
||||
const name = `${json.name.replace(' ', '_')}_${process.platform}_${
|
||||
archMap[process.arch]
|
||||
}.bz2`
|
||||
const name = `${json.name.replace(' ', '_')}_${process.platform}_${archMap[process.arch]}.bz2`
|
||||
const dl = json.assets.find((asset: any) => asset.name === name)
|
||||
if (!dl)
|
||||
return console.log(
|
||||
@@ -184,8 +154,8 @@ const handlers: Handlers = {
|
||||
unlinkSync(tmp)
|
||||
|
||||
w.replaceLn(`Moving to ${INSTALL_DIR} 🚙`)
|
||||
exec('chmod', ['+x', extracted])
|
||||
exec('mv', [extracted, INSTALL_DIR + '/restic'])
|
||||
chmodSync(extracted, 0o755)
|
||||
renameSync(extracted, INSTALL_DIR + '/restic')
|
||||
|
||||
w.done(
|
||||
`\nFinished! restic is installed under: ${INSTALL_DIR}`.underline + ' 🎉',
|
||||
@@ -225,7 +195,7 @@ const handlers: Handlers = {
|
||||
w.replaceLn('Downloading binary... 🌎')
|
||||
await downloadFile(dl.browser_download_url, to)
|
||||
|
||||
exec('chmod', ['+x', to])
|
||||
chmodSync(to, 0o755)
|
||||
}
|
||||
|
||||
w.done('All up to date! 🚀')
|
||||
@@ -258,7 +228,7 @@ export const help = () => {
|
||||
'\n help Show help' +
|
||||
'\n' +
|
||||
'\nExamples: '.yellow +
|
||||
'https://git.io/fjVbg' +
|
||||
'https://git.io/Jf0x6' +
|
||||
'\n',
|
||||
)
|
||||
}
|
||||
|
@@ -1,17 +1,15 @@
|
||||
import { config } from './autorestic'
|
||||
import { ConfigError, fill, treeToString } from './utils'
|
||||
import { fill, treeToString } from './utils'
|
||||
|
||||
|
||||
|
||||
const showAll = () => {
|
||||
if (!config) throw ConfigError
|
||||
|
||||
console.log('\n\n' + fill(32, '_') + 'LOCATIONS:'.underline)
|
||||
for (const [key, data] of Object.entries(config.locations)) {
|
||||
console.log(`\n${key.blue.underline}:`)
|
||||
console.log(treeToString(
|
||||
data,
|
||||
['to:', 'from:', 'hooks:', 'options:'],
|
||||
['to:', 'from:', 'hooks:', 'options:', 'cron:'],
|
||||
))
|
||||
}
|
||||
|
||||
|
32
src/lock.ts
Normal file
32
src/lock.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import fs from 'fs'
|
||||
|
||||
import { pathRelativeToConfigFile } from "./utils"
|
||||
import { Lockfile } from "./types"
|
||||
|
||||
export const getLockFileName = () => {
|
||||
const LOCK_FILE = '.autorestic.lock'
|
||||
return pathRelativeToConfigFile(LOCK_FILE)
|
||||
}
|
||||
|
||||
export const readLock = (): Lockfile => {
|
||||
const name = getLockFileName()
|
||||
let lock = {
|
||||
running: false,
|
||||
crons: {}
|
||||
}
|
||||
try {
|
||||
lock = JSON.parse(fs.readFileSync(name, { encoding: 'utf-8' }))
|
||||
} catch { }
|
||||
return lock
|
||||
}
|
||||
export const writeLock = (lock: Lockfile) => {
|
||||
const name = getLockFileName()
|
||||
fs.writeFileSync(name, JSON.stringify(lock, null, 2), { encoding: 'utf-8' })
|
||||
}
|
||||
|
||||
export const unlock = () => {
|
||||
writeLock({
|
||||
...readLock(),
|
||||
running: false,
|
||||
})
|
||||
}
|
78
src/restore.ts
Normal file
78
src/restore.ts
Normal file
@@ -0,0 +1,78 @@
|
||||
import { Writer } from 'clitastic'
|
||||
import { resolve } from 'path'
|
||||
|
||||
import { config } from './autorestic'
|
||||
import { getEnvFromBackend } from './backend'
|
||||
import { LocationFromPrefixes } from './config'
|
||||
import { Backend } from './types'
|
||||
import {
|
||||
checkIfDockerVolumeExistsOrFail,
|
||||
decodeLocationFromPrefix,
|
||||
exec,
|
||||
execPlain,
|
||||
getPathFromVolume,
|
||||
} from './utils'
|
||||
|
||||
|
||||
|
||||
export const restoreToFilesystem = (from: string, to: string, backend: Backend) => {
|
||||
exec(
|
||||
'restic',
|
||||
['restore', 'latest', '--path', resolve(from), '--target', to],
|
||||
{ env: getEnvFromBackend(backend) },
|
||||
)
|
||||
}
|
||||
|
||||
export const restoreToVolume = (volume: string, backend: Backend) => {
|
||||
const tmp = getPathFromVolume(volume)
|
||||
try {
|
||||
restoreToFilesystem(tmp, tmp, backend)
|
||||
try {
|
||||
checkIfDockerVolumeExistsOrFail(volume)
|
||||
} catch {
|
||||
execPlain(`docker volume create ${volume}`)
|
||||
}
|
||||
|
||||
// For incremental backups. Unfortunately due to how the docker mounts work the permissions get lost.
|
||||
// execPlain(`docker run --rm -v ${volume}:/data -v ${tmp}:/backup alpine cp -aT /backup /data`)
|
||||
execPlain(`docker run --rm -v ${volume}:/data -v ${tmp}:/backup alpine tar xf /backup/archive.tar -C /data`)
|
||||
} finally {
|
||||
execPlain(`rm -rf ${tmp}`)
|
||||
}
|
||||
}
|
||||
|
||||
export const restoreSingle = (locationName: string, from: string, to?: string) => {
|
||||
const location = config.locations[locationName]
|
||||
|
||||
const baseText = locationName.green + '\t\t'
|
||||
const w = new Writer(baseText + `Restoring...`)
|
||||
|
||||
let backendName: string = Array.isArray(location.to) ? location.to[0] : location.to
|
||||
if (from) {
|
||||
if (!location.to.includes(from)) {
|
||||
w.done(baseText + `Backend ${from} is not a valid location for ${locationName}`.red)
|
||||
return
|
||||
}
|
||||
backendName = from
|
||||
w.replaceLn(baseText + `Restoring from ${backendName.blue}...`)
|
||||
} else if (Array.isArray(location.to) && location.to.length > 1) {
|
||||
w.replaceLn(baseText + `Restoring from ${backendName.blue}...\tTo select a specific backend pass the ${'--from'.blue} flag`)
|
||||
}
|
||||
const backend = config.backends[backendName]
|
||||
|
||||
const [type, value] = decodeLocationFromPrefix(location.from)
|
||||
switch (type) {
|
||||
|
||||
case LocationFromPrefixes.Filesystem:
|
||||
if (!to) throw new Error(`You need to specify the restore path with --to`.red)
|
||||
restoreToFilesystem(value, to, backend)
|
||||
break
|
||||
|
||||
case LocationFromPrefixes.DockerVolume:
|
||||
restoreToVolume(value, backend)
|
||||
break
|
||||
|
||||
}
|
||||
w.done(locationName.green + '\t\tDone 🎉')
|
||||
}
|
||||
|
10
src/types.ts
10
src/types.ts
@@ -71,6 +71,7 @@ export type Backends = { [name: string]: Backend }
|
||||
export type Location = {
|
||||
from: string
|
||||
to: StringOrArray
|
||||
cron?: string
|
||||
hooks?: {
|
||||
before?: StringOrArray
|
||||
after?: StringOrArray
|
||||
@@ -91,4 +92,13 @@ export type Config = {
|
||||
backends: Backends
|
||||
}
|
||||
|
||||
export type Lockfile = {
|
||||
running: boolean
|
||||
crons: {
|
||||
[name: string]: {
|
||||
lastRun: number
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export type Flags = { [arg: string]: any }
|
||||
|
130
src/utils.ts
130
src/utils.ts
@@ -1,23 +1,16 @@
|
||||
import { spawnSync, SpawnSyncOptions } from 'child_process'
|
||||
import { randomBytes } from 'crypto'
|
||||
import { createWriteStream } from 'fs'
|
||||
import { dirname, isAbsolute, join, resolve } from 'path'
|
||||
import { homedir } from 'os'
|
||||
|
||||
import axios from 'axios'
|
||||
import { spawnSync, SpawnSyncOptions } from 'child_process'
|
||||
import { createHash, randomBytes } from 'crypto'
|
||||
import { createWriteStream, renameSync, unlinkSync } from 'fs'
|
||||
import { homedir, tmpdir } from 'os'
|
||||
import { dirname, isAbsolute, join, resolve } from 'path'
|
||||
import { Duration, Humanizer } from 'uhrwerk'
|
||||
|
||||
import { CONFIG_FILE } from './config'
|
||||
import { CONFIG_FILE, LocationFromPrefixes } from './config'
|
||||
import { Location } from './types'
|
||||
|
||||
|
||||
|
||||
export const exec = (
|
||||
command: string,
|
||||
args: string[],
|
||||
{ env, ...rest }: SpawnSyncOptions = {},
|
||||
) => {
|
||||
const cmd = spawnSync(command, args, {
|
||||
export const exec = (command: string, args: string[], { env, ...rest }: SpawnSyncOptions = {}) => {
|
||||
const { stdout, stderr, status } = spawnSync(command, args, {
|
||||
...rest,
|
||||
env: {
|
||||
...process.env,
|
||||
@@ -25,84 +18,73 @@ export const exec = (
|
||||
},
|
||||
})
|
||||
|
||||
const out = cmd.stdout && cmd.stdout.toString().trim()
|
||||
const err = cmd.stderr && cmd.stderr.toString().trim()
|
||||
const out = stdout && stdout.toString().trim()
|
||||
const err = stderr && stderr.toString().trim()
|
||||
|
||||
return { out, err }
|
||||
return { out, err, status }
|
||||
}
|
||||
|
||||
export const execPlain = (command: string, opt: SpawnSyncOptions = {}) => {
|
||||
const split = command.split(' ')
|
||||
if (split.length < 1) {
|
||||
console.log(`The command ${command} is not valid`.red)
|
||||
return
|
||||
}
|
||||
if (split.length < 1) throw new Error(`The command ${command} is not valid`.red)
|
||||
|
||||
return exec(split[0], split.slice(1), opt)
|
||||
return exec(split[0], split.slice(1), { shell: true, ...opt })
|
||||
}
|
||||
|
||||
export const checkIfResticIsAvailable = () =>
|
||||
checkIfCommandIsAvailable(
|
||||
'restic',
|
||||
'Restic is not installed'.red +
|
||||
' https://restic.readthedocs.io/en/latest/020_installation.html#stable-releases',
|
||||
'restic is not installed'.red +
|
||||
'\nEither run ' +
|
||||
'autorestic install'.green +
|
||||
'\nOr go to https://restic.readthedocs.io/en/latest/020_installation.html#stable-releases'
|
||||
)
|
||||
|
||||
export const checkIfCommandIsAvailable = (cmd: string, errorMsg?: string) => {
|
||||
if (require('child_process').spawnSync(cmd).error)
|
||||
throw new Error(errorMsg ? errorMsg : `"${errorMsg}" is not installed`.red)
|
||||
const error = spawnSync(cmd, { shell: true }).stderr
|
||||
if (error.length) throw new Error(errorMsg ? errorMsg : `"${cmd}" is not installed`.red)
|
||||
}
|
||||
|
||||
export const makeObjectKeysLowercase = (object: Object): any =>
|
||||
Object.fromEntries(
|
||||
Object.entries(object).map(([key, value]) => [key.toLowerCase(), value]),
|
||||
)
|
||||
|
||||
Object.fromEntries(Object.entries(object).map(([key, value]) => [key.toLowerCase(), value]))
|
||||
|
||||
export function rand(length = 32): string {
|
||||
return randomBytes(length / 2).toString('hex')
|
||||
}
|
||||
|
||||
|
||||
export const filterObject = <T>(
|
||||
obj: { [key: string]: T },
|
||||
filter: (item: [string, T]) => boolean,
|
||||
): { [key: string]: T } =>
|
||||
export const filterObject = <T>(obj: { [key: string]: T }, filter: (item: [string, T]) => boolean): { [key: string]: T } =>
|
||||
Object.fromEntries(Object.entries(obj).filter(filter))
|
||||
|
||||
export const filterObjectByKey = <T>(
|
||||
obj: { [key: string]: T },
|
||||
keys: string[],
|
||||
) => filterObject(obj, ([key]) => keys.includes(key))
|
||||
export const filterObjectByKey = <T>(obj: { [key: string]: T }, keys: string[]) => filterObject(obj, ([key]) => keys.includes(key))
|
||||
|
||||
export const downloadFile = async (url: string, to: string) =>
|
||||
new Promise<void>(async res => {
|
||||
new Promise<void>(async (res) => {
|
||||
const { data: file } = await axios({
|
||||
method: 'get',
|
||||
url: url,
|
||||
responseType: 'stream',
|
||||
})
|
||||
|
||||
const stream = createWriteStream(to)
|
||||
const tmp = join(tmpdir(), rand(64))
|
||||
const stream = createWriteStream(tmp)
|
||||
|
||||
const writer = file.pipe(stream)
|
||||
writer.on('close', () => {
|
||||
stream.close()
|
||||
try {
|
||||
// Delete file if already exists. Needed if the binary wants to replace itself.
|
||||
// Unix does not allow to overwrite a file that is being executed, but you can remove it and save other one at its place
|
||||
unlinkSync(to)
|
||||
} catch {}
|
||||
renameSync(tmp, to)
|
||||
res()
|
||||
})
|
||||
})
|
||||
|
||||
// Check if is an absolute path, otherwise get the path relative to the config file
|
||||
export const pathRelativeToConfigFile = (path: string): string => isAbsolute(path)
|
||||
? path
|
||||
: resolve(dirname(CONFIG_FILE), path)
|
||||
export const pathRelativeToConfigFile = (path: string): string => (isAbsolute(path) ? path : resolve(dirname(CONFIG_FILE), path))
|
||||
|
||||
export const resolveTildePath = (path: string): string | null =>
|
||||
(path.length === 0 || path[0] !== '~')
|
||||
? null
|
||||
: join(homedir(), path.slice(1))
|
||||
|
||||
export const ConfigError = new Error('Config file not found')
|
||||
export const resolveTildePath = (path: string): string | null => (path.length === 0 || path[0] !== '~' ? null : join(homedir(), path.slice(1)))
|
||||
|
||||
export const getFlagsFromLocation = (location: Location, command?: string): string[] => {
|
||||
if (!location.options) return []
|
||||
@@ -124,7 +106,7 @@ export const getFlagsFromLocation = (location: Location, command?: string): stri
|
||||
return flags
|
||||
}
|
||||
|
||||
export const makeArrayIfIsNot = <T>(maybeArray: T | T[]): T[] => Array.isArray(maybeArray) ? maybeArray : [maybeArray]
|
||||
export const makeArrayIfIsNot = <T>(maybeArray: T | T[]): T[] => (Array.isArray(maybeArray) ? maybeArray : [maybeArray])
|
||||
|
||||
export const fill = (length: number, filler = ' '): string => new Array(length).fill(filler).join('')
|
||||
|
||||
@@ -133,36 +115,56 @@ export const capitalize = (string: string): string => string.charAt(0).toUpperCa
|
||||
export const treeToString = (obj: Object, highlight = [] as string[]): string => {
|
||||
let cleaned = JSON.stringify(obj, null, 2)
|
||||
.replace(/[{}"\[\],]/g, '')
|
||||
.replace(/^ {2}/mg, '')
|
||||
.replace(/^ {2}/gm, '')
|
||||
.replace(/\n\s*\n/g, '\n')
|
||||
.trim()
|
||||
|
||||
for (const word of highlight)
|
||||
cleaned = cleaned.replace(word, capitalize(word).green)
|
||||
for (const word of highlight) cleaned = cleaned.replace(word, capitalize(word).green)
|
||||
|
||||
return cleaned
|
||||
}
|
||||
|
||||
|
||||
export class MeasureDuration {
|
||||
private static Humanizer: Humanizer = [
|
||||
[d => d.hours() > 0, d => `${d.hours()}h ${d.minutes()}min`],
|
||||
[d => d.minutes() > 0, d => `${d.minutes()}min ${d.seconds()}s`],
|
||||
[d => d.seconds() > 0, d => `${d.seconds()}s`],
|
||||
[() => true, d => `${d.milliseconds()}ms`],
|
||||
[(d) => d.hours() > 0, (d) => `${d.hours()}h ${d.minutes()}min`],
|
||||
[(d) => d.minutes() > 0, (d) => `${d.minutes()}min ${d.seconds()}s`],
|
||||
[(d) => d.seconds() > 0, (d) => `${d.seconds()}s`],
|
||||
[() => true, (d) => `${d.milliseconds()}ms`],
|
||||
]
|
||||
|
||||
private start = Date.now()
|
||||
|
||||
|
||||
finished(human?: false): number
|
||||
finished(human?: true): string
|
||||
finished(human?: boolean): number | string {
|
||||
const delta = Date.now() - this.start
|
||||
|
||||
return human
|
||||
? new Duration(delta, 'ms').humanize(MeasureDuration.Humanizer)
|
||||
: delta
|
||||
return human ? new Duration(delta, 'ms').humanize(MeasureDuration.Humanizer) : delta
|
||||
}
|
||||
}
|
||||
|
||||
export const decodeLocationFromPrefix = (from: string): [LocationFromPrefixes, string] => {
|
||||
const firstDelimiter = from.indexOf(':')
|
||||
if (firstDelimiter === -1) return [LocationFromPrefixes.Filesystem, from]
|
||||
|
||||
const type = from.substr(0, firstDelimiter)
|
||||
const value = from.substr(firstDelimiter + 1)
|
||||
|
||||
switch (type.toLowerCase()) {
|
||||
case 'volume':
|
||||
return [LocationFromPrefixes.DockerVolume, value]
|
||||
case 'path':
|
||||
return [LocationFromPrefixes.Filesystem, value]
|
||||
default:
|
||||
throw new Error(`Could not decode the location from: ${from}`.red)
|
||||
}
|
||||
}
|
||||
|
||||
export const hash = (plain: string): string => createHash('sha1').update(plain).digest().toString('hex')
|
||||
|
||||
export const getPathFromVolume = (volume: string) => pathRelativeToConfigFile(hash(volume))
|
||||
|
||||
export const checkIfDockerVolumeExistsOrFail = (volume: string) => {
|
||||
const cmd = exec('docker', ['volume', 'inspect', volume])
|
||||
if (cmd.err.length > 0) throw new Error('Volume not found')
|
||||
}
|
||||
|
Reference in New Issue
Block a user