Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: filter ssh commands where dest is not over ssh #58

Merged
merged 3 commits into from
Apr 6, 2024

Conversation

joshbrooks
Copy link
Contributor

This is one possible solution for the issue I'm facing where some commands:

  • check for backup marker
  • check that dest folder exists
  • creating the latest symlink

were actually running on the src instead of the dest.

Run verbose and you would note that some commands are now run locally

Args are: --verbose [email protected]:/home/josh/Documents /tmp/edesk.local/Documents

Snipped output shows where some commands which used to be run remote are now run locally

rsync-time-machine.py: Running remote command: test -e '/home/josh/Documents'
rsync-time-machine.py: Running local command: find '/tmp/edesk.local/Documents/backup.marker'
rsync-time-machine.py: Command output: /tmp/edesk.local/Documents/backup.marker
rsync-time-machine.py: Running local command: find '/tmp/edesk.local/Documents/' -maxdepth 1 -
rsync-time-machine.py: Running remote command: find '/tmp/edesk.local/Documents/backup.inprogress'
...
rsync-time-machine.py: Running local command: rm -f -- '/tmp/edesk.local/Documents/latest'
rsync-time-machine.py: Running local command: ln -s -- '2024-03-25-172323' '/tmp/edesk.local/Documents/latest'
rsync-time-machine.py: Running remote command: rm -f -- '/tmp/edesk.local/Documents/backup.inprogress'

@basnijholt
Copy link
Owner

Hi @joshbrooks, awesome! Thanks a lot for fixing this.

I am currently on vacation so I might not find time in the coming week to test this out. If you could add a unit test I would be more confident to merge without testing it by hand 😃

@basnijholt basnijholt merged commit 1518362 into basnijholt:main Apr 6, 2024
13 checks passed
@basnijholt
Copy link
Owner

Awesome! Thank you so much 😄

I will make a new release ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants