Update README.md
Fixed readme file
This commit is contained in:
@@ -18,19 +18,19 @@ On OS X, it has a few disadvantages compared to Time Machine - in particular it
|
|||||||
|
|
||||||
* Backup the home folder to backup_drive
|
* Backup the home folder to backup_drive
|
||||||
|
|
||||||
rsync_tmbackup.sh /home /mnt/backup_drive
|
rsync_tmbackup.sh /home /mnt/backup_drive
|
||||||
|
|
||||||
* Backup with exclusion list:
|
* Backup with exclusion list:
|
||||||
|
|
||||||
rsync_tmbackup.sh /home /mnt/backup_drive excluded_patterns.txt
|
rsync_tmbackup.sh /home /mnt/backup_drive excluded_patterns.txt
|
||||||
|
|
||||||
* Backup to remote drive over SSH, on port 2222:
|
* Backup to remote drive over SSH, on port 2222:
|
||||||
|
|
||||||
rsync_tmbackup.sh -p 2222 /home user@example.com:/mnt/backup_drive
|
rsync_tmbackup.sh -p 2222 /home user@example.com:/mnt/backup_drive
|
||||||
|
|
||||||
* To mimic Time Machine's behaviour, a cron script can be setup to backup at regular interval. For example, the following cron job checks if the drive "/mnt/backup" is currently connected and, if it is, starts the backup. It does this check every 1 hour.
|
* To mimic Time Machine's behaviour, a cron script can be setup to backup at regular interval. For example, the following cron job checks if the drive "/mnt/backup" is currently connected and, if it is, starts the backup. It does this check every 1 hour.
|
||||||
|
|
||||||
0 */1 * * * if [[ -d /mnt/backup ]]; then rsync_tmbackup.sh /home /mnt/backup; fi
|
0 */1 * * * if [[ -d /mnt/backup ]]; then rsync_tmbackup.sh /home /mnt/backup; fi
|
||||||
|
|
||||||
* The use `flock` is recommended so that only one instance of the script runs at a given time:
|
* The use `flock` is recommended so that only one instance of the script runs at a given time:
|
||||||
|
|
||||||
@@ -46,12 +46,6 @@ To display the rsync options that are used for backup, run `./rsync_tmbackup.sh
|
|||||||
|
|
||||||
rsync_tmbackup --rsync-set-flags "--numeric-ids --links --hard-links --one-file-system --archive --no-perms --no-groups --itemize-changes" /src /dest
|
rsync_tmbackup --rsync-set-flags "--numeric-ids --links --hard-links --one-file-system --archive --no-perms --no-groups --itemize-changes" /src /dest
|
||||||
|
|
||||||
## Lock file
|
|
||||||
|
|
||||||
The use of a lock-file is recommended for larger backups. [Flock(1)](https://github.com/discoteq/flock) is an easy way to get lock files and can be installed with Homebrew. Please refer to its GitHub page for more details. To use flock with the script, see this example:
|
|
||||||
|
|
||||||
flock -n /tmp/rsync.lock sh -c 'bash rsync_tmbackup.sh /home /mnt/backup_drive'
|
|
||||||
|
|
||||||
# Features
|
# Features
|
||||||
|
|
||||||
* Each backup is on its own folder named after the current timestamp. Files can be copied and restored directly, without any intermediate tool.
|
* Each backup is on its own folder named after the current timestamp. Files can be copied and restored directly, without any intermediate tool.
|
||||||
|
|||||||
Reference in New Issue
Block a user