basnijholt / rsync-time-machine.py

Ultralight Time Machine-style backups using rsync
Apache License 2.0
377 stars 16 forks source link

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

Closed joshbrooks closed 7 months ago

joshbrooks commented 7 months ago

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

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 josh@edesk.local:/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 commented 7 months ago

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 commented 7 months ago

Awesome! Thank you so much 😄

I will make a new release ASAP.