https://github.com/bebehei/backup-with-borg
Simple script to backup with borg
https://github.com/bebehei/backup-with-borg
backup backup-script borg borg-backup borgbackup
Last synced: 10 months ago
JSON representation
Simple script to backup with borg
- Host: GitHub
- URL: https://github.com/bebehei/backup-with-borg
- Owner: bebehei
- Created: 2017-04-24T20:01:56.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-07-19T16:16:31.000Z (over 1 year ago)
- Last Synced: 2025-06-12T07:07:17.830Z (10 months ago)
- Topics: backup, backup-script, borg, borg-backup, borgbackup
- Language: Shell
- Size: 7.81 KB
- Stars: 6
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# backup-with-borg
Backup tool to create easily archives with borgbackup.
## Usage
```
backup do-create
```
Create a new archive with your current configuration.
```
backup do-prune
```
Prune your archives according to `KEEP_*` variables in the configuration file.
```
backup (do)
backup
```
Create a new archive and then prune the repository archives. (Wraps `do-create` and `do-prune`)
### Wrapper
You also can use native `borg` commands like `list` or mount. These will respect the exported `BORG_*` variables. So a plain `backup list` will list all of your current archives in the configured repository.
## Installation
You need to have [borgbackup](https://github.com/borgbackup/borg/) prior to your first run. See [borg's installations instructions](https://borgbackup.readthedocs.io/en/stable/installation.html) for details.
# install scripts
git clone https://github.com/bebehei/backup-with-borg
cd backup-with-borg
make install
cp /etc/backup/{example,default}.env
# edit default.env to match backup data
$EDITOR /etc/backup/default.env
# initialize everything
backup init -e
# add cronjob (for hourly backup)
{ crontab -l ; echo "0 * * * * backup"; } | crontab -
**Hint: Depending on your configuration, you may need sudo for some commands.**