Files
restic-scripts/README.md
John Lancaster be7b64f8e4 readme update
2024-05-27 01:09:23 -05:00

47 lines
1.2 KiB
Markdown

# Restic Scripts
## Environment Variables
Recommended to put these in the relevant `~/.bashrc` file
| Env Variable | Description |
|---------------------|--------------------------------------------------------------------------------------------|
| `BACKUP_DIR` | Directory to back up |
| `RESTIC_REPOSITORY` | Directory for the restic repository. This is usually on a mount point made from Proxmox |
| `RESTIC_PASSWORD` | Password for the restic repository |
| `LOKI_URL` | Push URL for Loki. Should include the port and end with something like `/loki/api/v1/push` |
## Usage
### Python
```shell
python -m restic.snapshots
```
```shell
python -m restic.backup --tag manual --project joplin --services app,db
```
```shell
python -m restic.prune
```
### Shell Scripts
```shell
./restic_command.sh snapshots
```
```shell
./restic_backup.sh --tag manual
```
```shell
./restic_command.sh forget --keep-last 1
```
```shell
./restic_command.sh restore
```