2013-10-27 04:31:06 +00:00
# Rsync time backup
2013-10-27 03:57:45 +00:00
2014-02-02 18:19:25 +00:00
Time Machine style backup with rsync. Should work on Linux, OS X and Windows with Cygwin. The main advantage over Time Machine is the flexibility as it can backup from/to any filesystem and works on any platform. You can also backup, for example, to a Truecrypt drive without any problem.
2014-02-02 18:20:46 +00:00
On OS X, it has a few disadvantages compared to Time Machine - in particular it doesn't auto-start when the backup drive is plugged (though it can be achieved using a launch agent), it requires some knowledge of the command line, and no specific GUI is provided to restore files. Instead files can be restored by using any file explorer, including Finder, or the command line.
2013-10-27 04:31:06 +00:00
# Installation
2013-10-27 04:34:05 +00:00
git clone https://github.com/laurent22/rsync-time-backup
2013-10-27 04:31:06 +00:00
# Usage
2013-10-27 04:34:05 +00:00
rsync_tmbackup.sh < source > < destination > [excluded-pattern-path]
2013-10-27 04:31:06 +00:00
## Examples
2013-10-27 04:34:05 +00:00
2013-10-27 06:19:37 +00:00
* Backup the home folder to backup_drive
2013-10-27 04:34:05 +00:00
2013-10-27 06:22:37 +00:00
rsync_tmbackup.sh /home /mnt/backup_drive
2013-10-27 04:34:05 +00:00
2013-10-27 06:19:37 +00:00
* Backup with exclusion list:
2013-10-27 04:34:05 +00:00
2013-10-27 06:22:37 +00:00
rsync_tmbackup.sh /home /mnt/backup_drive excluded_patterns.txt
2013-10-27 04:34:05 +00:00
2013-10-27 04:31:06 +00:00
## Exclude file
2014-01-26 20:20:49 +00:00
An optional exclude file can be provided as a third parameter. It should be compatible with the `--exclude-from` parameter of rsync. See [this tutorial] (https://sites.google.com/site/rsync2u/home/rsync-tutorial/the-exclude-from-option) for more information.
2013-10-27 04:31:06 +00:00
# Features
* Each backup is on its own folder named after the current timestamp. Files can be copied and restored directly, without any intermediate tool.
* Files that haven't changed from one backup to the next are hard-linked to the previous backup so take very little extra space.
2014-01-26 20:20:49 +00:00
* Safety check - the backup will only happen if the destination has explicitly been marked as a backup destination.
2013-10-27 04:31:06 +00:00
* Resume feature - if a backup has failed or was interrupted, the tool will resume from there on the next backup.
2013-10-27 04:34:05 +00:00
* Exclude file - support for pattern-based exclusion via the `--exclude-from` rsync parameter.
2013-10-27 04:31:06 +00:00
2013-11-16 14:50:10 +00:00
* Automatically purge old backups - within 24 hours, all backups are kept. Within one month, the most recent backup for each day is kept. For all previous backups, the most recent of each month is kept.
2013-11-15 10:06:49 +00:00
* "latest" symlink that points to the latest successful backup.
* The application is just one bash script that can be easily edited.
2013-10-27 04:31:06 +00:00
# TODO
2014-01-11 19:09:12 +00:00
* Check source and destination file-system. If one of them is FAT, use the --modify-window rsync parameter (see `man rsync` ) with a value of 1 or 2.
2013-11-13 17:16:31 +00:00
* Minor changes (see TODO comments in the source).
2013-11-13 09:57:51 +00:00
2013-11-16 14:50:10 +00:00
* Backup to remote drive?
2013-10-28 07:47:57 +00:00
# LICENSE
2014-09-19 09:02:32 +00:00
The MIT License (MIT)
2015-09-24 22:05:03 +00:00
Copyright (c) 2013-2015 Laurent Cozic
2014-09-19 09:02:32 +00:00
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.