lincremental
lincremental copied to clipboard
A set of bash scripts for automated incremental backups with rsync
lincremental - an incremental backup system using rsync
Lincremental is heavily based on Mike Rubel's guide. It is easily configurable, you can set the number of hourly/daily/weekly/monthly backups to keep, as well as automatically keeping all the backup sets in sync with a server via rysnc daemon or ssh. Lincremental doesn't however make the backup sets "as read only as possible" (none of the mounting / unmounting that Rubel does) so make sure not to mess them up. I don't have any users apart from myself so I don't have to worry about that too much (famous last words).
It will only backup a single directory (e.g. /home/.ecryptfs
) as specified in lincremental.cfg
.
Steps to install:
- set the appropriate parameters in
lincremental.cfg
-
mkdir /etc/lincremental
-
mv lincremental.cfg /etc/lincremental/
-
mkdir /usr/local/lincremental
-
mv lincremental_* /usr/local/lincremental/
-
/usr/local/lincremental/lincremental_initial.sh
-
/usr/local/lincremental/lincremental_network.sh
(optional) -
ln -s /usr/local/lincremental/lincremental_hourly.sh /etc/cron.hourly/lincremental
-
ln -s /usr/local/lincremental/lincremental_daily.sh /etc/cron.daily/lincremental
-
ln -s /usr/local/lincremental/lincremental_weekly.sh /etc/cron.weekly/lincremental
-
ln -s /usr/local/lincremental/lincremental_monthly.sh /etc/cron.monthly/lincremental
-
ln -s /usr/local/lincremental/lincremental_network.sh /etc/cron.hourly/lincrementalnetwork
(optional)
amazon glacier backups
Lincremental can also backup to amazon's glacier service. At the moment this does not mean incremental backups, but rather uploading a copy of the latest daily backup every 28 days (configurable). While these uploads are only initiated once every 28 days (configurable), they are resumed automatically every hour until they are complete.
Use this feature at your own risk, I am not liable for any charges you incur from amazon (or anywhere else for that matter). See LICENSE file for legal details.
Steps to install:
- install lincremental as above
- download, install and configure glacier-cmd and test that it is working (for root user)
- set the appropriate options under the amazon glacier section in
/etc/lincremental/lincremental.cfg
- if you want your files to be encrypted before being uploaded to amazon (recommended), configure GnuPG and provide the appropriate public key in
/etc/lincremental/lincremental.cfg
(GPG_PUBLIC_KEY
) -
ln -s /usr/local/lincremental/lincremental_awsglacier.sh /etc/cron.hourly/lincrementalglacier
Note that when using encryption, you must backup your GnuPG private keys to somewhere manually rather than relying on lincremental and amazon glacier. If you lose the private keys in a hard drive crash, the encrypted backups on glacier will be useless.
known issues
see buglist