Skip to content

Shell script for encrypted backups with rsync and GnuPG

License

Notifications You must be signed in to change notification settings

brainfucksec/rbackup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rbackup

Introduction

rbackup is a shell script for making backup of your Linux system with rsync. Uses tar gzip for compression and GnuPG for encryption.

This program is a "wrapper" for rsync, then you need to familiarize first with this program, see: rsync, also you need a gpg key for encrypt the archives.

Install

For install the program dowload the git repository and run the sh installer present in the git folder:

git clone https://github.com/brainfucksec/rbackup
cd rbackup
chmod +x install.sh
./install.sh

The installer create a $HOME/bin folder with a rbackup executable and $HOME/.config/rbackup folder for the configuration files.

Configuration

You need to edit the following configuration files for run rbackup:

~/.config/rbackup/config

This file is for rsync and backup main settings (i.e. user data, directories and files to backup, external volumes paths).

~/.config/rbackup/excluderc

This file is for directories and files to be excluded from backups, used by rsync option --exclude-from=FILE.

See: man rsync and rsync --help for more information.

These files are widely commented, anyway you can find the examples in /data/examples folder.

Usage

For start backup just run the script with --start or -s option:

rbackup --start

For show the help menù:

rbackup --help

Also you can run this script with crontab for periodic backups, e.g.:

crontab -e
# Run rbackup every night at 00:05
05 00 * * * ${HOME}/bin/rbackup --start

See: Linux crontab Command Help and Examples

This script use the following rsync default options:

--archive, -a            archive mode; equals -rlptgoD (no -H,-A,-X)
--human-readable, -h     output numbers in a human-readable format
--one-file-system, -x    don't cross filesystem boundaries
--info=progress2         show total transfer progress
--log-file=FILE          log what we're doing to the specified FILE
--exclude-from=FILE      read exclude patterns from FILE

See: man rsync and rsync --help for more information.

The completed backups are placed in the $HOME/.backups folder.

References:

Releases

No releases published

Packages

No packages published

Languages