mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2025-09-06 02:20:39 +00:00
Compare commits
20 Commits
Author | SHA1 | Date | |
---|---|---|---|
9256cdc38c | |||
a8c611e8ce | |||
d4522c7ffe | |||
21185d894e | |||
b119fc7ea5 | |||
|
73f4bcfd48 | ||
|
3567319314 | ||
|
bf19c983d1 | ||
|
12e4de110b | ||
c9f425ef64 | |||
974f555dff | |||
1688c1f3c3 | |||
29e46d3b5c | |||
0335abb669 | |||
b2f9b9a54e | |||
2b13a6e13d | |||
cc293ea256 | |||
a4ddd5bbcb | |||
7cbf43b75d | |||
bae77c4673 |
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
@@ -15,6 +15,11 @@ jobs:
|
|||||||
go-version: '^1.16.3'
|
go-version: '^1.16.3'
|
||||||
- name: Build
|
- name: Build
|
||||||
run: go run build/build.go
|
run: go run build/build.go
|
||||||
|
|
||||||
|
- name: Sign
|
||||||
|
uses: tristan-weil/ghaction-checksum-sign-artifact@v1.0.1
|
||||||
|
with:
|
||||||
|
path: dist/*
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
|
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [1.0.9] - 2021-05-01
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Validation for docker volumes
|
||||||
|
|
||||||
## [1.0.8] - 2021-04-28
|
## [1.0.8] - 2021-04-28
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@@ -21,3 +21,9 @@ Releases are automatically built by the github workflow and uploaded to the rele
|
|||||||
3. Commit to master
|
3. Commit to master
|
||||||
4. Create a new release with the `v1.2.3` tag and mark as draft.
|
4. Create a new release with the `v1.2.3` tag and mark as draft.
|
||||||
5. The Github action will build the binaries, upload and mark the release as ready when done.
|
5. The Github action will build the binaries, upload and mark the release as ready when done.
|
||||||
|
|
||||||
|
### Brew
|
||||||
|
|
||||||
|
1. Check the checksum with `shasum -a 256 autorestic-1.2.3.tar.gz`
|
||||||
|
2. Update `url` and `sha256` in the brew repo.
|
||||||
|
3. Submit PR
|
||||||
|
@@ -10,6 +10,10 @@
|
|||||||
Config driven, easy backup cli for <a href="https://restic.net/">restic</a>.
|
Config driven, easy backup cli for <a href="https://restic.net/">restic</a>.
|
||||||
<br>
|
<br>
|
||||||
<strong><a href="https://autorestic.vercel.app/">»»» Docs & Getting Started »»»</a></strong>
|
<strong><a href="https://autorestic.vercel.app/">»»» Docs & Getting Started »»»</a></strong>
|
||||||
|
<br><br>
|
||||||
|
<a target="_blank" href="https://discord.gg/wS7RpYTYd2">
|
||||||
|
<img src="https://img.shields.io/discord/252403122348097536" alt="discord badge" />
|
||||||
|
</a>
|
||||||
</p>
|
</p>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -35,7 +39,7 @@ Autorestic is a wrapper around the amazing [restic](https://restic.net/). While
|
|||||||
|
|
||||||
### ❓ Questions / Support
|
### ❓ Questions / Support
|
||||||
|
|
||||||
Check the [discussions page](https://github.com/cupcakearmy/autorestic/discussions)
|
Check the [discussions page](https://github.com/cupcakearmy/autorestic/discussions) or [join on discord](https://discord.gg/wS7RpYTYd2)
|
||||||
|
|
||||||
## Contributing / Developing
|
## Contributing / Developing
|
||||||
|
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
[Home](/)
|
[Home](/)
|
||||||
[Quick Start](/quick)
|
[Quick Start](/quick)
|
||||||
|
[Installation](/installation)
|
||||||
[Configuration](/config)
|
[Configuration](/config)
|
||||||
[Upgrade](/upgrade)
|
[Upgrade](/upgrade)
|
||||||
|
|
||||||
@@ -7,8 +8,13 @@
|
|||||||
>
|
>
|
||||||
> [Overview](/location/overview)
|
> [Overview](/location/overview)
|
||||||
> [Hooks](/location/hooks)
|
> [Hooks](/location/hooks)
|
||||||
> [Excluding Files](/location/exclude)
|
>
|
||||||
> [Forget Policy](/location/forget)
|
> > :Collapse label=Options
|
||||||
|
> >
|
||||||
|
> > [Overview](/location/options)
|
||||||
|
> > [Excluding Files](/location/exclude)
|
||||||
|
> > [Forget Policy](/location/forget)
|
||||||
|
>
|
||||||
> [Cron](/location/cron)
|
> [Cron](/location/cron)
|
||||||
> [Docker Volumes](/location/docker)
|
> [Docker Volumes](/location/docker)
|
||||||
|
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
autorestic exec [-b, --backend] [-a, --all] <command> -- [native options]
|
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. Generally will want to include the verbose flag `-v, --verbose` to see the output. An example would be listing all the snapshots of all your backends:
|
This is a very handy command which enables you to run any native restic command on desired backends. Generally you will want to include the verbose flag `-v, --verbose` to see the output. An example would be listing all the snapshots of all your backends:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
autorestic exec -av -- snapshots
|
autorestic exec -av -- snapshots
|
||||||
|
@@ -6,7 +6,7 @@ autorestic restore [-l, --location] [--from backend] [--to <out dir>] [-f, --for
|
|||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
The `--to` path das to be empty as no data will be overwritten by default. If you are sure you can pass the `-f, --force` flag and the data will be overwritten in the destination. However note that this will overwrite all the data existent in the backup, not only the 1 file that is missing e.g.
|
The `--to` path has to be empty as no data will be overwritten by default. If you are sure you can pass the `-f, --force` flag and the data will be overwritten in the destination. However note that this will overwrite all the data existent in the backup, not only the 1 file that is missing e.g.
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# Uninstall
|
# Uninstall
|
||||||
|
|
||||||
Installs both restic and autorestic from `/usr/local/bin`.
|
Uninstalls both restic and autorestic from `/usr/local/bin`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
autorestic uninstall
|
autorestic uninstall
|
||||||
|
@@ -4,10 +4,13 @@ This amazing people helped the project!
|
|||||||
|
|
||||||
- @agateblue - Docs, Pruning, S3
|
- @agateblue - Docs, Pruning, S3
|
||||||
- @david-boles - Docs
|
- @david-boles - Docs
|
||||||
|
- @SebDanielsson - Brew
|
||||||
|
- @n194 - AUR Package
|
||||||
- @jin-park-dev - Typos
|
- @jin-park-dev - Typos
|
||||||
- @sumnerboy12 - Typos
|
- @sumnerboy12 - Typos
|
||||||
- @FuzzyMistborn - Typos
|
- @FuzzyMistborn - Typos
|
||||||
- @ChanceM - Typos
|
- @ChanceM - Typos
|
||||||
- @TheForcer - Typos
|
- @TheForcer - Typos
|
||||||
|
- @themorlan - Typos
|
||||||
|
|
||||||
> :ToCPrevNext
|
> :ToCPrevNext
|
||||||
|
@@ -8,7 +8,7 @@ autorestic exec -av -- snapshots
|
|||||||
|
|
||||||
## Unlock a locked repository
|
## Unlock a locked repository
|
||||||
|
|
||||||
This can come in handy if a backup process crashed or if it was accidentally cancelled. Then the repository would still be locked without an actual process using it. Only do this if you know what you are sure no other process is actually reading/writing to the repository of course.
|
This can come in handy if a backup process crashed or if it was accidentally cancelled. Then the repository would still be locked without an actual process using it. Only do this if you know what you are doing and are sure no other process is actually reading/writing to the repository of course.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
autorestic exec -b my-backend -- unlock
|
autorestic exec -b my-backend -- unlock
|
||||||
|
@@ -8,4 +8,18 @@ Autorestic requires `curl`, `wget` and `bzip2` to be installed. For most systems
|
|||||||
curl -s https://raw.githubusercontent.com/CupCakeArmy/autorestic/master/install.sh | bash
|
curl -s https://raw.githubusercontent.com/CupCakeArmy/autorestic/master/install.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Alternatives
|
||||||
|
|
||||||
|
### Manual
|
||||||
|
|
||||||
|
You can download the right binary from the release page and simply copy it to `/usr/local/bin` or whatever path you prefer. Autoupdates will still work.
|
||||||
|
|
||||||
|
### Brew
|
||||||
|
|
||||||
|
If you are on macOS you can install through brew: `brew install autorestic`.
|
||||||
|
|
||||||
|
### AUR
|
||||||
|
|
||||||
|
If you are on Arch there is an [AUR Package](https://aur.archlinux.org/packages/autorestic-bin/) by @n194.
|
||||||
|
|
||||||
> :ToCPrevNext
|
> :ToCPrevNext
|
||||||
|
19
docs/markdown/location/options.md
Normal file
19
docs/markdown/location/options.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Options
|
||||||
|
|
||||||
|
For the `backup` and `forget` commands you can pass any native flags to `restic`.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
locations:
|
||||||
|
foo:
|
||||||
|
path: ...
|
||||||
|
to: ...
|
||||||
|
options:
|
||||||
|
backup:
|
||||||
|
tag:
|
||||||
|
- foo
|
||||||
|
- bar
|
||||||
|
```
|
||||||
|
|
||||||
|
In this example, whenever `autorestic` runs `restic backup` it will append a `--tag abc --tag` to the native command.
|
||||||
|
|
||||||
|
> :ToCPrevNext
|
@@ -6,6 +6,8 @@
|
|||||||
curl -s https://raw.githubusercontent.com/CupCakeArmy/autorestic/master/install.sh | bash
|
curl -s https://raw.githubusercontent.com/CupCakeArmy/autorestic/master/install.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
|
See [installation](/installation) for alternative options.
|
||||||
|
|
||||||
## Write a simple config file
|
## Write a simple config file
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@@ -12,7 +12,7 @@ import (
|
|||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
|
|
||||||
const VERSION = "1.0.8"
|
const VERSION = "1.0.9"
|
||||||
|
|
||||||
var CI bool = false
|
var CI bool = false
|
||||||
var VERBOSE bool = false
|
var VERBOSE bool = false
|
||||||
|
@@ -49,14 +49,16 @@ func (l Location) validate(c *Config) error {
|
|||||||
if l.From == "" {
|
if l.From == "" {
|
||||||
return fmt.Errorf(`Location "%s" is missing "from" key`, l.name)
|
return fmt.Errorf(`Location "%s" is missing "from" key`, l.name)
|
||||||
}
|
}
|
||||||
if from, err := GetPathRelativeToConfig(l.From); err != nil {
|
if l.getType() == TypeLocal {
|
||||||
return err
|
if from, err := GetPathRelativeToConfig(l.From); err != nil {
|
||||||
} else {
|
|
||||||
if stat, err := os.Stat(from); err != nil {
|
|
||||||
return err
|
return err
|
||||||
} else {
|
} else {
|
||||||
if !stat.IsDir() {
|
if stat, err := os.Stat(from); err != nil {
|
||||||
return fmt.Errorf("\"%s\" is not valid directory for location \"%s\"", from, l.name)
|
return err
|
||||||
|
} else {
|
||||||
|
if !stat.IsDir() {
|
||||||
|
return fmt.Errorf("\"%s\" is not valid directory for location \"%s\"", from, l.name)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user