Compare commits

..

9 Commits
0.15 ... 0.16

Author SHA1 Message Date
7e577c439a notify user if config file was overwritten and make a copy of it as backup 2020-03-02 19:08:20 +01:00
bc36a39de4 Update README.md 2020-03-02 19:01:39 +01:00
9e6b393e62 Update README.md 2020-03-02 18:59:40 +01:00
de34396b93 Update README.md 2020-02-26 12:18:04 +01:00
ebbe10608a Update README.md 2020-02-26 12:13:46 +01:00
8a34270934 Update README.md 2020-02-26 12:12:40 +01:00
e459e393a9 Update README.md 2020-01-23 11:27:00 +01:00
b1a3074f33 changelog 2020-01-23 11:20:44 +01:00
ae63d8b12e protected drone file 2020-01-23 11:19:16 +01:00
5 changed files with 48 additions and 66 deletions

View File

@@ -1,3 +1,4 @@
---
kind: pipeline
name: default
@@ -22,4 +23,9 @@ steps:
- sha512
note: CHANGELOG.md
when:
event: tag
event: tag
---
kind: signature
hmac: 3b1f235f6a6f0ee1aa3f572d0833c4f0eec931dbe0378f31b9efa336a7462912
...

View File

@@ -1,58 +1,3 @@
# Changelog
## 0.16
## 0.14
- Fixed #17 enable sftp
- Fixed #18 help command
## 0.13
- Restored files are now without the prefix path.
- Support for making backups of docker volumes and restoring them (not incremental).
- Show error to user during backup
## 0.12
- fix self update on linux (Fix #15)
## 0.11
- tilde in arguments (Fix #14)
## 0.10
- Show elapsed time (Fix #12)
- Remove some code duplication
- New info command to quickly show an overview of your config (Fix #11)
## 0.9
- Hooks
- Cleanup
## 0.8
- Support for native flags in the backup and forget commands.
- Forget cleanup
## 0.7
- Cleanup
- Support for excluding files
- Ability to prune keeping the last x snapshots according to restic policy rules
## 0.6
- support for absolute paths
## 0.5
- config optional if not required for current operation
## 0.4
- show version number
## 0.3
- test autoupdate function
- notify user if config file was overwritten and make a copy of it as backup

View File

@@ -5,6 +5,10 @@ Autorestic is a wrapper around the amazing [restic](https://restic.net/). While
![Sketch](./docs/Sketch.png)
## ✈️ 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 :)
## 🌈 Features
- Config files, no CLI
@@ -25,10 +29,11 @@ Autorestic is a wrapper around the amazing [restic](https://restic.net/). While
* [Backends](#-backends)
* [Commands](#-commands)
* [Examples](#-examples)
* [QA](#-qa)
## 🛳 Installation
Linux & macOS. Windows is not supported.
Linux & macOS. Windows is not supported. If you have problems installing please open an issue :)
```
curl -s https://raw.githubusercontent.com/CupCakeArmy/autorestic/master/install.sh | bash
@@ -36,6 +41,12 @@ curl -s https://raw.githubusercontent.com/CupCakeArmy/autorestic/master/install.
## 🚀 Quickstart
##### ⚠️ 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 or config file somewhere in case your server dies**. Otherwise DATA IS LOST!
Also, currently comments in the config file will be deleted, due how the yaml parsing library works. I will fix this soon :)
### 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`.
@@ -70,10 +81,6 @@ Then we check if everything is correct by running the `check` command. We will p
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
```
@@ -427,6 +434,13 @@ autorestic -a exec snapshots
autorestic -b my-backend exec unlock
```
## ❓ 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.
Unforunately 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.
## Contributors
This amazing people helped the project!

View File

@@ -25,7 +25,7 @@ export const { _: commands, ...flags } = minimist(process.argv.slice(2), {
string: ['l', 'b'],
})
export const VERSION = '0.14'
export const VERSION = '0.16'
export const INSTALL_DIR = '/usr/local/bin'
export const VERBOSE = flags.verbose

View File

@@ -1,4 +1,4 @@
import { readFileSync, writeFileSync, statSync } from 'fs'
import { readFileSync, writeFileSync, statSync, copyFileSync } from 'fs'
import { resolve } from 'path'
import { homedir } from 'os'
@@ -88,10 +88,27 @@ export const init = (): Config | undefined => {
yaml.safeLoad(readFileSync(CONFIG_FILE).toString()),
)
const current = JSON.stringify(raw)
normalizeAndCheckBackends(raw)
normalizeAndCheckBackups(raw)
writeFileSync(CONFIG_FILE, yaml.safeDump(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/Jv2D0'.underline.grey +
'\n'
)
}
return raw
}