Added SSH and Time Machine style backup example
This commit is contained in:
@@ -24,6 +24,14 @@ On OS X, it has a few disadvantages compared to Time Machine - in particular it
|
||||
|
||||
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
|
||||
|
||||
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.
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user