Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Guten Backup, the simplest rsync wrapper for backup and restore Linux system. Support ArchLinux, Ubuntu, etc
Shell
branch: master
Failed to load latest commit information.
bin v3.0.0 the simplest rsync wrapper
examples/archlinux example-archlinux: update data
libexec a
misc remove misc/build.sh, use gutaur instead
test add test
.drone.yml remove misc/build.sh, use gutaur instead
.gitignore add archlinux example
LICENSE update readme
README.md a
VERSION add VERSION
ake simplify packaging

README.md

gutbackup, the simplest rsync wrapper for backup Linux system

Homepage | Documentation | Issue Tracker | MIT License | Bountysource | by Guten Ye

Install
ArchLinux pacaur -S gutbackup
Ubuntu ...

Getting Started

Mount backup USB drive to /backup
$ mkdir -p /backup/conf/hello
$ vi /backup/conf/hello/default

    backup_options="-aP"
    files="
    /etc/fstab
    /etc/mtab
    "

$ gutbackup backup hello -- --dry-run
> rsync --files-from /tmp/files.gutbackup -aP --dry-run / /backup/hello/

That's it, as you can see, it just build a rsync command using options from /backup/conf/hello/default bash file.

Backup to another location

$ gutbackup backup hello -to /tmp/backup
> backup to /tmp/backup
> read conf from /tmp/backup/conf/hello/default

Backup to another location with another conf directory

$ gutbackup backup hello -to /tmp/backup -conf /etc/backup
> backup to /tmp/backup
> read conf from /etc/backup/hello/default

Configuration

You can provide options in four locations, later one override the previous. They are just plain bash files.

  • system-wide: /etc/gutbackup.conf
  • local-wide: $conf/<profile>.conf
  • local-wide: $conf/<profile>/<instance>
  • cmdline
# edit /etc/gutbackup.conf

  from="/"
  to="/backup"
  conf="$to/conf"

# edit /backup/conf/hello.conf

  backup_options="-aP"

# edit /backup/conf/hello/default

  files="/etc/fstab"

# edit /backup/conf/hello/data

  files="/root"

# cmdline

  $ gutbackup backup <profile> [instance] [options] -- [rsync-options]
  $ gutbackup backup hello     # if you omit the instance, it's "default".
  $ gutbackup backup hello data -from / -to /backup -conf /backup/conf -- --dry-run

Read more at Archlinux Example, Tutorial, and Documentation

Schedule Backup

# sytemctl enable gutbackup@hello.timer
By default, it runs daily, you can change it by
# systemctl edit gutbackup@hello.timer
  [Timer]
  OnCalendar=weekly
Read more at $ man systemd.timer

I Also Use These Backup Apps

Copyright

The MIT License (MIT)

Copyright (c) 2013-2015 Guten Ye

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Something went wrong with that request. Please try again.