GithubHelp home page GithubHelp logo

taw00 / rtb-rpm Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 198 KB

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

License: Mozilla Public License 2.0

backup utility time-machine rsync linux fedora centos rpm opensuse

rtb-rpm's Introduction

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>

rtb-rpm's People

Contributors

taw00 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.