Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mannkind/borg-rclone-autobackup
Easily automate backups using Borg + RClone
https://github.com/mannkind/borg-rclone-autobackup
backup borgbackup docker home-automation rclone
Last synced: 8 days ago
JSON representation
Easily automate backups using Borg + RClone
- Host: GitHub
- URL: https://github.com/mannkind/borg-rclone-autobackup
- Owner: mannkind
- License: mit
- Created: 2018-05-03T04:02:30.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-07-12T19:45:04.000Z (over 2 years ago)
- Last Synced: 2024-08-01T12:24:11.080Z (3 months ago)
- Topics: backup, borgbackup, docker, home-automation, rclone
- Language: Python
- Size: 32.2 KB
- Stars: 25
- Watchers: 1
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Borg + RClone Autobackup
Easily automate backups using Borg + RClone.
## Usage Examples
### Docker Run
```
docker run \
-v /home/mannkind:/data:ro \
-e BACKUP_NAME="frodo" \
-e BACKUP_LOCATION="b2:AllMyBorgBackups/frodo" \
-e BACKUP_SCHEDULE="0 2 * * *" \
-e BACKUP_ENCRYPTION_KEY="One ring to rule them all oh you know the rest" \
-e BACKUP_PRUNE="--keep-daily=7 --keep-weekly=4" \
-e BACKUP_NOW="true" \
-e B2_ID="kiacup6326is" \
-e B2_KEY="12xd5t3891tqh1qqw1qq3kmhl9hbd9lfugz2j32d" \
--restart unless-stopped \
mannkind/borg-rclone-autobackup
```### Docker Compose
```
version: 3
services:
borg-rclone-autobackup:
image: mannkind/borg-rclone-autobackup
restart: unless-stopped
volumes:
- "/home/mannkind:/data:ro"
environment:
BACKUP_NAME: "frodo"
BACKUP_LOCATION: "b2:AllMyBorgBackups/frodo"
BACKUP_SCHEDULE: "0 2 * * *"
BACKUP_ENCRYPTION_KEY: "One ring to rule them all one ring to find them one ring to bring them all and in the darkness bind them"
BACKUP_PRUNE: "--keep-daily=7 --keep-weekly=4"
BACKUP_NOW: "true"
B2_ID: "kiacup6326is"
B2_KEY:"12xd5t3891tqh1qqw1qq3kmhl9hbd9lfugz2j32d"
```## Volumes
The following volumes can be used
* /data - The data to backup
* /backups - The location of the backups; backup in the container by default## Environment Variables
The following environment variables setup Borg
* `BACKUP_NAME`: The backup name
* `BACKUP_ENCRYPTION_KEY`: The backup encryption key
* `BACKUP_SCHEDULE`: Cron scheduled string
* `BACKUP_LOCATION`: The backup location e.g. `b2:my-backup/some-host`
* `BACKUP_PRUNE`: The backup prune string e.g. `--keep-daily=7 --keep-weekly=4`
* `BACKUP_NOW`: Runs the backup immediately, instead of waiting for the scheduled timeThe following environment variables setup B2 as the RClone target
* `B2_ID`: The backblaze id
* `B2_KEY`: The backblaze keyThe following environment variables set up Google Cloud Storage as the RClone target:
* `GCS_PROJECT_NUMBER`: The project number for your Google Cloud project.
Mount a Google Cloud service account private key, in json format, to `/google-service-account.json` and for the backup location, use format `gcs:/`.