From a9eb0efbadc174a2b511f165029015dc797ad7b6 Mon Sep 17 00:00:00 2001 From: AbdelKarim Mateos Date: Tue, 24 Sep 2019 08:46:28 +0200 Subject: Doc: Update mount example to work on more systems (#147) `0 */1 * * * if [[ -d /mnt/backup ]]; then rsync_tmbackup.sh /home /mnt/backup; fi` this is not valid for all sistems. Is not POSIX compilant. IMHO best soltuion is `if grep -qs /mnt/backup /proc/mounts; then rsync_tmbackup.sh /home /mnt/backup; fi` Best regards and thanks for your script. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 216e012..138b305 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,8 @@ On macOS, it has a few disadvantages compared to Time Machine - in particular it * 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 grep -qs /mnt/backup /proc/mounts; then rsync_tmbackup.sh /home /mnt/backup; fi ## Backup expiration logic -- cgit v1.2.3