Updated README and mentioned built-in lock
This commit is contained in:
@@ -41,10 +41,6 @@ On macOS, it has a few disadvantages compared to Time Machine - in particular it
|
||||
|
||||
0 */1 * * * if [[ -d /mnt/backup ]]; then rsync_tmbackup.sh /home /mnt/backup; fi
|
||||
|
||||
* The use of `flock` is recommended so that only one instance of the script runs at a given time:
|
||||
|
||||
flock -n /tmp/rsync_tmbackup.lock rsync_tmbackup.sh /home /mnt/backup
|
||||
|
||||
## Backup expiration logic
|
||||
|
||||
The script automatically deletes old backups using the following logic:
|
||||
@@ -57,6 +53,10 @@ The script automatically deletes old backups using the following logic:
|
||||
|
||||
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.
|
||||
|
||||
## Built-in lock
|
||||
|
||||
The script is designed so that only one backup operation can be active for a given directory. If a new backup operation is started while another is still active (i.e. it has not finished yet), the new one will be automaticalled interrupted. Thanks to this the use of `flock` to run the script is not necessary.
|
||||
|
||||
## Rsync options
|
||||
|
||||
To display the rsync options that are used for backup, run `./rsync_tmbackup.sh --rsync-get-flags`. It is also possible to add or remove options using the `--rsync-set-flags` option. For example, to exclude backing up permissions and groups:
|
||||
|
||||
Reference in New Issue
Block a user