Skip to content

Commit

Permalink
Merge pull request #36 from cytopia/release-0.7
Browse files Browse the repository at this point in the history
Release v0.7
  • Loading branch information
cytopia authored Mar 29, 2020
2 parents ee50fc4 + ae99f92 commit 2f4d08b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Changelog


## Release v0.7

#### Changed
- [#21](https://github.com/cytopia/linux-timemachine/issues/21) No preservation of symlinks


## Release v0.6

#### Fixed
Expand Down
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Linux TimeMachine (cli-only)

**[Install](#install)** | **[Uninstall](#uninstall)** | **[TL;DR](#tldr)** | **[Features](#features)** | **[Backups](#backups)** | **[Failures](#failures)** | **[Usage](#usage)** | **[License](#license)**
**[Install](#install)** | **[Uninstall](#uninstall)** | **[TL;DR](#tldr)** | **[Features](#features)** | **[Backups](#backups)** | **[Failures](#failures)** | **[Usage](#usage)** | **[Troubleshooting](#troubleshooting)** | **[License](#license)**

[![Linting](https://github.com/cytopia/linux-timemachine/workflows/Linting/badge.svg)](https://github.com/cytopia/linux-timemachine/actions?workflow=Linting)
[![Linux](https://github.com/cytopia/linux-timemachine/workflows/Linux/badge.svg)](https://github.com/cytopia/linux-timemachine/actions?workflow=Linux)
Expand All @@ -10,7 +10,9 @@

This shell script mimics the behavior of OSX's timemachine. It uses [rsync](https://linux.die.net/man/1/rsync) to incrementally back up your data to a different directory or hard disk. All operations are incremental, atomic and automatically resumable.

By default the only rsync option used is `--recursive`. This is because some remote NAS implementations do not support symlinks, changing owner, group or permissions (due to restrictive ACL's). If you want to use any other rsync arguments, you can simply append them.
By default the only rsync option used are `--recursive`, `--times` and `--links`. This is because some remote NAS implementations do not support, changing owner, group or permissions (due to restrictive ACL's). If you want to use any other rsync arguments, you can simply append them.

If you destination filesystem does not support symlinks see [Troubleshooting](#troubleshooting).


## Install
Expand All @@ -35,7 +37,7 @@ $ timemachine /source/dir /target/dir

# Append rsync options
$ timemachine /source/dir /target/dir -- --specials --progress
$ timemachine /source/dir /target/dir -- --specials --links --times --perms
$ timemachine /source/dir /target/dir -- --specials --perms
$ timemachine /source/dir /target/dir -- --archive --progress

# Make the timemachine script be more verbose
Expand Down Expand Up @@ -150,14 +152,25 @@ Examples:
Do the same, but be verbose
timemachine -v /home/user /data
Append rsync options and be verbose
timemachine /home/user /data -- --links --times --perms --special
timemachine /home/user /data -- --perms --special
timemachine --verbose /home/user /data -- --archive --progress --verbose
Recommendation for cron run (no stdout, but stderr)
timemachine /home/user /data -- -q
timemachine /home/user -v /data -- --verbose > /var/log/timemachine.log
```


## Troubleshooting

### Target filesystem does not support symlinks
In case your target filesystem does not support symlinks, you can explicitly disable them and have
them copied as files via:
```bash
$ timemachine src/ dst/ -- --copy-links
$ timemachine src/ dst/ -- -L
```


## License

[MIT License](LICENSE.md)
Expand Down
6 changes: 4 additions & 2 deletions timemachine
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ MY_DESC="OSX-like timemachine cli script for Linux and BSD (and even OSX)"
MY_PROJ="https://github.com/cytopia/linux-timemachine"
MY_AUTH="cytopia"
MY_MAIL="[email protected]"
MY_VERS="0.6"
MY_VERS="0.7"
MY_DATE="2020-03-29"

# cmd [-r] <src> <dst> [rsync opts]
Expand Down Expand Up @@ -56,7 +56,7 @@ print_usage() {
echo " Do the same, but be verbose"
echo " timemachine -v /home/user /data"
echo " Append rsync options and be verbose"
echo " timemachine /home/user /data -- --links --times --perms --special"
echo " timemachine /home/user /data -- --perms --special"
echo " timemachine --verbose /home/user /data -- --archive --progress --verbose"
echo " Recommendation for cron run (no stdout, but stderr)"
echo " timemachine /home/user /data -- -q"
Expand Down Expand Up @@ -192,6 +192,7 @@ if test -L "${DEST}/${BACKUP_LATEST}"; then
rsync \
--recursive \
--times \
--links \
--delete \
--delete-excluded \
--partial-dir="${RSYNC_PARTIAL}" \
Expand All @@ -206,6 +207,7 @@ else
rsync \
--recursive \
--times \
--links \
--delete \
--delete-excluded \
--partial-dir="${RSYNC_PARTIAL}" \
Expand Down

0 comments on commit 2f4d08b

Please sign in to comment.