summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Cozic <laurent@cozic.net>2016-08-16 09:36:57 +0100
committerLaurent Cozic <laurent@cozic.net>2016-08-16 09:36:57 +0100
commit5a0fd5f3b107ab9a01e6ab9c57a8ae2167a2492c (patch)
tree09b14dc32825a037edd41140b834ad39a284ef75
parent6157826651f0cbd685f8652ba4967a6b4ed58b99 (diff)
Added SSH and Time Machine style backup example
-rw-r--r--README.md8
-rwxr-xr-xrsync_tmbackup.sh1
2 files changed, 9 insertions, 0 deletions
diff --git a/README.md b/README.md
index 27bd812..8713425 100644
--- a/README.md
+++ b/README.md
@@ -23,6 +23,14 @@ On OS X, it has a few disadvantages compared to Time Machine - in particular it
* Backup with exclusion list:
rsync_tmbackup.sh /home /mnt/backup_drive excluded_patterns.txt
+
+* Backup to remote drive over SSH, on port 2222:
+
+ 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.
+
+ 0 */1 * * * if [[ -d /mnt/backup ]]; then rsync_tmbackup.sh /home /mnt/backup; fi
## Exclude file
diff --git a/rsync_tmbackup.sh b/rsync_tmbackup.sh
index d159c94..d325b0b 100755
--- a/rsync_tmbackup.sh
+++ b/rsync_tmbackup.sh
@@ -36,6 +36,7 @@ fn_display_usage() {
fn_log_info ""
fn_log_info "Options:"
fn_log_info "-p, --port SSH port"
+ fn_log_info "-h, --help Display this help message"
}
fn_parse_date() {