Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

README.md

A script to initialize borgbackup and rclone and run them as periodic services

This script aims to ease the installation of borgbackup and rclone. The idea is to make backups each hour and upload them to cloud storage each day.

You could run this on Linux or on macOS.

This script use your backup configuration to bundle it into the executable file to provide you with the handy commands and register systemd/launchd jobs to run it each hour.

If you wish to fine-tune the borgbackup, rclone or systemd/launchd services I suggest you to clone that repository and make changes to backup-script file.

How to install/use it

  1. Checkout the repository

  2. Run the following command to install backup-script system-wide and install dependencies if needed (rclone and borgbackup):

./backup-script install
  1. Write your backup configuration. You could use test-backup file as a reference.

  2. Run the following command to make an executable bundle from your configuration and backup-script, install it system-wide, and register systemd/launchd periodic jobs:

backup-script install test-backup # or ./path/to/test-backup
  • You could also choose not to install backup-script system-wide and only install executable bundle of your config + said script. You may find it usefull if you are working back and forth on modifying backup-script content.
./backup-script install test-backup
  1. Run the following command to initialize the borg-backup repository:
test-backup init
  • Your test-backup at that point is installed as a system-wide command, so you could run the command from any directory.

  • If your RCLONE_REMOTE is not configured the interactive rclone configuration will start.

  1. That's it! At that point once in an hour backup will be created and once a day it will be uploaded to your could store.

Short summary of commands

# If configuration is installed system-wide
test-backup # perform-backup and then upload-offsite
test-backup uninstall
test-backup init
test-backup rclone-config
test-backup perform-backup
test-backup upload-offsite
test-backup start
test-backup stop
test-backup status
test-backup log
test-backup shell

# If configuration is not installed system-wide
backup-script use test-backup # perform-backup and then upload-offsite
backup-script use test-backup install
backup-script use test-backup uninstall
backup-script use test-backup init
backup-script use test-backup rclone-config
backup-script use test-backup perform-backup
backup-script use test-backup upload-offsite
backup-script use test-backup start
backup-script use test-backup stop
backup-script use test-backup status
backup-script use test-backup log
backup-script use test-backup shell

About

A script to initialize borgbackup and rclone and run them as periodic services

Topics

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.