Files
backy/README.md
T

113 lines
2.4 KiB
Markdown
Raw Normal View History

2023-01-17 00:55:28 -06:00
# Backy - an application to manage backups
This app is in development, and is currently not stable. Expect core functionality to possiblly break.
2023-01-17 02:21:55 -06:00
## Installing
2023-01-17 00:55:28 -06:00
2023-01-17 02:21:55 -06:00
To install:
2023-01-17 23:08:34 -06:00
`go install git.andrewnw.xyz/CyberShell/backy@master`
2023-01-17 02:21:55 -06:00
This assumes you already have a working Go environment, if not please see [this page](https://golang.org/doc/install) first.
You can also download binaries [here](https://git.andrewnw.xyz/CyberShell/backy/releases) and [here](https://github.com/CybersShell/backy/releases).
## Features
- Define lists of commands and run them
- Execute commands over SSH
- More to come.
2023-01-17 02:21:55 -06:00
To run a config:
`backy backup`
Or to use a specific file:
2023-02-01 23:45:23 -06:00
```backy backup -f /path/to/file```
2023-01-17 02:21:55 -06:00
If you leave the config path blank, the following paths will be searched in order:
- `./backy.yaml`
- `~/.config/backy.yaml`
2023-01-17 00:55:28 -06:00
Create a file at `~/.config/backy.yaml`:
```yaml
commands:
stop-docker-container:
cmd: docker
2023-02-01 23:45:23 -06:00
Args:
2023-01-17 00:55:28 -06:00
- compose
- -f /some/path/to/docker-compose.yaml
- down
2023-02-01 23:45:23 -06:00
# if host is not defined, cmd will be run locally
2023-01-17 00:55:28 -06:00
host: some-host
backup-docker-container-script:
cmd: /path/to/script
2023-02-01 23:45:23 -06:00
# The host has to be defined in the config file
2023-01-17 00:55:28 -06:00
host: some-host
shell-cmd:
cmd: rsync
shell: bash
2023-02-01 23:45:23 -06:00
Args:
2023-01-17 00:55:28 -06:00
- -av some-host:/path/to/data ~/Docker/Backups/docker-data
hostname:
cmd: hostname
cmd-configs:
2023-02-01 23:45:23 -06:00
cmds-to-run: # this can be any name you want
2023-01-17 00:55:28 -06:00
# all commands have to be defined
order:
- stop-docker-container
- backup-docker-container-script
- shell-cmd
- hostname
notifications:
- matrix
2023-02-01 23:45:23 -06:00
name: backup-some-server
2023-01-17 00:55:28 -06:00
hostname:
2023-02-01 23:45:23 -06:00
name: hostname
2023-01-17 00:55:28 -06:00
order:
- hostname
notifications:
- prod-email
hosts:
some-host:
2023-02-01 23:45:23 -06:00
hostname: some-hostname
config: ~/.ssh/config
user: user
privatekeypath: /path/to/private/key
port: 22
password:
2023-01-17 00:55:28 -06:00
logging:
verbose: true
file: /path/to/logs/commands.log
2023-02-01 23:45:23 -06:00
console: false
cmd-std-out: false
2023-01-17 00:55:28 -06:00
notifications:
prod-email:
id: prod-email
type: mail
2023-02-01 23:45:23 -06:00
host: yourhost.tld:port
2023-01-17 00:55:28 -06:00
senderAddress: email@domain.tld
to:
- admin@domain.tld
username: smtp-username@domain.tld
password: your-password-here
matrix:
id: matrix
type: matrix
2023-02-01 23:45:23 -06:00
home-server: your-home-server.tld
2023-01-17 00:55:28 -06:00
room-id: room-id
access-token: your-access-token
user-id: your-user-id
```