Commit graph

230 commits

Author SHA1 Message Date
Laurent Cozic
c0b2ccd7c1
Update README.md 2024-09-12 07:28:31 +01:00
qinjunjerry
7af3df3644
Update symlink and remove .inprogress only after success (#264) 2023-12-17 18:51:09 +00:00
Laurent Cozic
6664e6c5bc
Fixed indentation and white space 2023-12-17 10:16:28 +00:00
Edwin Kofler
d14cafde7b
fix: Quote $0 and printed variable (#263) 2023-12-13 14:25:04 +00:00
Laurent Cozic
c859a821b8
Update README.md 2023-03-14 16:03:18 +00:00
x4e-jonas
ff223c9df0
README: Add --rsync-append-flags (#242) 2021-12-17 18:16:58 +00:00
Benjamin
7e3618c514
mod fn_parse_date, mismatch version/syntax of date (#240)
* mod fn_parse_date

combine identical cases, rm oft-failing darwin, subproc syntax

* repair my default spaces to not expand tabs
2021-06-25 16:44:49 +01:00
ettoetto
30339af32b
corrected typo :-) (#233) 2021-03-30 14:11:44 +01:00
psmanek
6374c32a95
Update rsync_tmbackup.sh (#232)
Fix: Source path with spaces.
2021-02-28 18:02:59 +00:00
linleybao
88db869fe7 fix typo (#179) 2019-11-05 16:39:26 +00:00
omer-musa-battal
da904fe66c File existence and file system type checks (#170)
Added error checking for nonexistent source file.
Also added file system type checks for destination and source, rsync flags are updated accordingly.
2019-09-29 15:57:59 +01:00
kapitainsky
27c56e9690 Fix lock to support more than one backup script running (#163) 2019-09-28 13:32:25 +01:00
Laurent Cozic
b460078ab0
Tabs 2019-09-25 22:18:57 +01:00
kapitainsky
48b42bf6ba Fix edge case in backup expiration logic (#166)
* bugfix - fn_expire_backups function

* add BACKUP_TO_KEEP parameter

* correct PREVIOUS_DEST test

* variables case correction for consistency
2019-09-25 22:18:06 +01:00
Laurent Cozic
eb5fe002e6
Create FUNDING.yml 2019-09-24 07:47:41 +01:00
Laurent Cozic
218e43e5bf
Doc: Removed redundant example 2019-09-24 07:46:51 +01:00
AbdelKarim Mateos
a9eb0efbad 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.
2019-09-24 07:46:28 +01:00
Laurent Cozic
e2b4148855
Removed comment from --rsync-get-flags option 2019-09-06 15:29:31 +01:00
zwotzie
1b4319b827 move rsync flag --compress to ssh section. It will be used only if de… (#159)
* move rsync flag --compress to ssh section. It will be used only if destination is accessed via ssh

* fix identation, use tabs only
2019-08-16 13:44:27 +02:00
Wikinaut
c40c3b2b77 typo corr (#145) 2019-02-23 23:36:59 +00:00
DeeeeLAN
72d694d8e4 Added rsync-append-flags method and method to specify id_rsa for ssh (#134)
* added rsync-append-flag method and method to specify id_rsa for ssh

* fixed formatting

* fixed formatting
2019-01-18 12:17:34 +00:00
Laurent Cozic
ae564afa9c
Merge pull request #124 from cr1901/netbsd
NetBSD Fixes
2018-06-13 20:13:30 +01:00
William D. Jones
487fd112c1 Use NetBSD ps in place of pgrep to determine whether a backup is currently running. 2018-06-13 18:54:57 +00:00
William D. Jones
2ba179ca7d Add NetBSD date parsing. 2018-06-12 13:33:21 +00:00
Laurent Cozic
5e0f3bb09d
Merge pull request #120 from laurent22/expiration-strategy
Expiration strategy
2018-05-18 11:11:30 +01:00
Laurent Cozic
9eba8e81c4
Merge pull request #114 from neddy70/no-auto-expire
Add option to disable automatic purging of backups
2018-03-18 11:55:50 +00:00
Neddy70
9f9a4945e2 Merge branch 'expiration-strategy' into no-auto-expire
Merge upstream fixes
2018-03-18 21:54:36 +11:00
Laurent Cozic
1a731243f7 Merge branch 'expiration-strategy' of github.com:laurent22/rsync-time-backup into expiration-strategy 2018-03-18 10:07:31 +00:00
Neddy70
b0654c96e0 Added option to disable automatically purging old backups when out of space. 2018-03-17 11:41:14 +11:00
Laurent Cozic
7f1431c13a Fixed date parsing issue 2018-03-05 19:29:14 +00:00
Laurent Cozic
4af7610dd1
Update README.md 2018-02-26 10:57:58 +00:00
Laurent Cozic
c5af8528bb Merge branch 'master' into expiration-strategy 2018-02-24 12:26:46 +00:00
Laurent Cozic
051733df1e Fixed variable names 2018-02-23 18:19:09 +00:00
Laurent Cozic
7383c50134 Documented backup expiration strategy and added test file 2018-02-23 18:16:37 +00:00
Laurent Cozic
a77169818e Changed order of expiration strategy items 2018-02-23 17:55:12 +00:00
Laurent Cozic
c211541848
Merge pull request #110 from Loki3000/master
Fix work with symlink as a destination
2018-02-23 09:53:45 +00:00
Loki3000
80c4d26573
Fix work with symlink as a destination
https://github.com/laurent22/rsync-time-backup/issues/92
2018-02-23 12:25:36 +03:00
Laurent Cozic
5aac62cfc0
Merge pull request #109 from NathanFrench/master
Fix to assure only one instance is running.
2018-02-12 12:38:49 +01:00
Nathan French
bfa1fd092e
Fix to assure only one instance is running.
Since this script runs under /usr/bin/env, running 'pgrep $0' will fail
due to it being a child of 'bash'. In order to fix this, pgrep must use
the `-o` flag (oldest pid, or in this case, the leader), and `-f` which
searches the full process name.
2018-01-19 13:42:54 -05:00
Laurent Cozic
c313e0a322
Merge pull request #102 from mmolinac/tigercompat
Replaced operator '=~' with 'grep -Eq' and using a perl one-liner to …
2017-12-09 11:07:56 +00:00
Manuel Molina Cuberos
19ecacad25 Newer versions of bash reports OSTYPE differently. This copes with the case. 2017-12-09 11:28:22 +01:00
Manuel Molina Cuberos
31a7bac4b4 Replaced operator '=~' with 'grep -Eq' and using a perl one-liner to avoid 'date -j'. Both are not compatible with Mac OS X Tiger. 2017-12-08 22:20:53 +01:00
Laurent Cozic
b57cf4b732 Removed accidentally committed test files 2017-11-26 17:00:02 +00:00
Laurent Cozic
2d0cb29bcb Allow specifying the expiration strategy tokens in any order (less error prone) 2017-11-26 16:59:29 +00:00
Laurent Cozic
c608793b60 Moved expiration logic to own function and implemented handling of strategy tokens 2017-11-26 16:48:03 +00:00
Matthias Kern
e988703100 Added --strategy option description 2017-11-24 20:20:58 +01:00
Matthias Kern
c5c1307062 Introduces function that parses the --strategy option into a two dimensional array 2017-11-24 20:16:22 +01:00
Laurent Cozic
d13af58252
Merge pull request #96 from thomas-mc-work/patch-1
Also detect single dashes as error
2017-11-17 12:17:22 +01:00
Thomas McWork
260715a9b9
Also detect single dashes as error
This also recognizes single dashes as invalid input:

    rsync_tmbackup.sh - 1 2 3

Expected output: an error because it's unknown what the single `-` could mean

Actual output:

    rsync_tmbackup: Safety check failed - the destination does not appear to be a backup folder or drive (marker file not found).
    rsync_tmbackup: If it is indeed a backup folder, you may add the marker file by running the following command:
    rsync_tmbackup: 
    rsync_tmbackup: mkdir -p -- "1" ; touch "1/backup.marker"
    rsync_tmbackup:
2017-11-17 10:20:50 +01:00
Laurent Cozic
fd4a29e848 Update README.md
It would make sense to have the list of features first
2017-10-05 21:18:14 +01:00