Skip to content
/ rtb-rpm Public

rtb or rsync-time-backup — an incremental managed backup utility — packaged for the Fedora, Red Hat(IBM), and OpenSUSE family of operating systems

License

Notifications You must be signed in to change notification settings

taw00/rtb-rpm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rtb-rpm

Rsync Time Backup — a time-machine-style backup utility — packaged for Fedora, EL (RHEL/CentOS), and OpenSUSE

rtb is a command line driven backup utility leveraging the popular project, rsync-time-backup and its extension rtb-wrapper. Under the covers, rsync does all the heavy-lifting. Backups are incremental where same-files are maintained with hardlinks between backup trees. rtb has many similarities in concept to backintime, but is focused on simplicity. Profiles can be defined for different backup scenarios.

Installation:

# Initial installation of the COPR repository
sudo dnf copr enable taw/rtb
# Installation of rtb
sudo dnf install rtb

All *.src.rpm packages provided in rtb-rpm GitHub repository should be signed with my GPG key
Binary packages are delivered by the COPR build system as enabled above. Those packages are signed with the Fedora Project's COPR GPG signing key

The upstream projects

The underlying projects (upstream):

My changes

rtb is essentially a symlink to rtb-wrapper.sh with two changes:

  • The default configuration directory is $HOME/.config/rtb (instead of $HOME/.rsync_tmbackup/)
  • The log directory is set to $HOME/.local/log/rtb/ (instead of $HOME/.rsync_tmbackup/)

How-To

  1. First create the configuration directory:
mkdir -p $HOME/.config/rtb
  1. Decide where you are backing things up to. Personally, I use the keybase filesystem, but for our example, we are using a folder in the /tmp/mybackups directory.
  2. Create an initial backup profile: $HOME/.config/rtb/home-documents.inc
SOURCE="$HOME/Documents"
TARGET="/tmp/mybackups/Documents"
EXCLUDE_FILE="$HOME/.config/rtb/home-documents.excludes.lst"
WIPE_SOURCE_ON_RESTORE=false

If that target was via ssh, it may look something like TARGET="todd@myserver:some/backup/directory" 4. Edit your master home directory excludes list:
$HOME/.config/rtb/home.excludes.lst
It might look something like this.

# home.excludes.lst — my home directory master list of excludes
# Assumption: SOURCE="$HOME"
#
# Documents -- We are backing up Documents separately in this example, see below
- /Documents/
#+ /Documents/*.pdf
#+ /Documents/*.txt
#+ /Documents/*.md
#+ /Documents/*.docx
#+ /Documents/*.odt
#- /Documents/*
#- /Documents/.*

# Never backed up
- /Downloads/
# /Applications that can be restored via passphrase and the cloud
- /.mozilla/
- /.config/google-chrome/
- /.local/share/keybase/

# Music -- back up all of it 
+ /Music/

# Atom -- keep the configuration and toss the rest
+ /.atom/*.cson
+ /.atom/*.coffee
+ /.atom/*.less
+ /.atom/*.package.list
- /.atom/*
- /.atom/.*

# SSH (critical)
+ /.ssh/
  1. Create your documents excludes list ($HOME/.config/rtb/home-documents.excludes.lst):
# home-documents.excludes.lst
# Assumption: SOURCE="$HOME/Documents"
# Certain things are explicitely permitted in this example and everything else
# is filtered from the backup. This will ignore directories and other
# structures.
+ *.pdf
+ *.txt
+ *.md
+ *.docx
+ *.odt
- *
- .*
  1. Run it!
rtb backup home-documents

IMPORTANT NOTE:
Run the first time, the script will likely yell that you need to touch a …/backup.marker file in the target directory. Follow the instructions messaged by the script and then run the backup again. This is essentially an "are you sure?" step.

  1. Restore it!
rtb restore home-documents

More Information

For more information about rtb-wrapper, please visit https://github.com/thomas-mc-work/rtb-wrapper

For more information about rsync-time-backup, which this is all based off of, please visit: https://github.com/laurent22/rsync-time-backup. That project's README has more information about the expiration logic of the backups, more about how that exclusion file works, etc. The hardest part of all this is that darn exclusion file. It's tricky to get just right.

Finally, the raw utilities live in /usr/share/rtb/, but for nearly all use cases, you only need to use /usr/bin/rtb

Enjoy

Contact information:

  • My usernames in various social places: taw, taw00, and t0dd
  • Email: Todd Warner <t0dd_at_protonmail.com>

About

rtb or rsync-time-backup — an incremental managed backup utility — packaged for the Fedora, Red Hat(IBM), and OpenSUSE family of operating systems

Topics

Resources

License

Stars

Watchers

Forks