pu.sh is a simple POSIX shell script which deploys a nice versioned backup solution based on rsync's hardlinking capability, which creates many snapshots in local or remote hosts (with SSH) without data redundancy.
Why not rsnapshot?
rsnapshot is infinitely better than pu.sh, but works differently. Whereas rsnapshot download, pu.sh upload.
rsnapshot pulls, pu.sh pushes. Remember this! ;-)
Install instructions
It's simple:
# svn export http://pu-sh.googlecode.com/svn/trunk/pu.sh /usr/local/bin/pu.sh
If you prefer wget, do:
# wget http://pu-sh.googlecode.com/svn/trunk/pu.sh -O /usr/local/bin/pu.sh # chmod +x /usr/local/bin/pu.sh
Ready.
Running
To uses pu.sh you need these softwares installed in your computer:
Synopsys:
$ pu.sh [-q] [-v]... [-e FILE] [-l FILE] [--] SRC [SRC]... [[USER@]HOST:]DEST
Examples usage
Push some dirs into /var/backups:
$ pu.sh /home /usr/local/bin /var/backups
Push / with a exclude list into /backups in example.net:
# pu.sh -e /etc/pu-sh/exclude.list / root@example.net:/backups/
Push /var/mail to remote host and writes a log in /var/log/pu-sh.log
# pu.sh -l /var/log/pu-sh.log /var/mail root@192.168.0.1:/var/cache/pu-sh
For more instructions, run pu.sh -h.
Simple deploy
Put the script below for run with cron:
#!/bin/sh SOURCES="/etc /srv /opt /home /root /var/lib /var/www /usr/local /var/log /var/mail /var/spool" DEST="user@example.net:/backups/`hostname -f`" cat <<END_EXCLUDE_LIST | /usr/local/bin/pu.sh -q -l /var/log/pu-sh.log $SOURCES $DEST lost+found/ *~ .nfs* /media /mnt /dev /proc /sys /tmp /var/tmp END_EXCLUDE_LIST
In destination directory, you will have something like this:
2008-02-22_21:17:02/ 2008-02-23_01:17:02/ 2008-02-23_05:17:02/ 2008-02-22_22:17:02/ 2008-02-23_02:17:02/ 2008-02-23_06:17:02/ 2008-02-23_10:17:02/ last@
Contributing
If you find any problems in the code or documentation, please take 30 seconds to fill out a issue here.
The contributing with code is MUCH-APPRECIATED. You feel free to send patchs.
To get a list of all work needed for future releases, visit the URL <http://code.google.com/p/pu-sh/issues/list?q=label:Milestone%20status:Accepted,Started>.
See AUTHORS file for a complete authors list of this application.