cjnaz / rclonesync-V2

A Bidirectional Cloud Sync Utility using rclone
MIT License
355 stars 39 forks source link

allow rclone --copy-links switch #18

Closed katchy3132 closed 5 years ago

katchy3132 commented 5 years ago

can you allow the --copy-linksswitch to pass through to rclone ?

cjnaz commented 5 years ago

See if the switch can be put in your config file for the remote. See https://rclone.org/docs/#config-file. If that doesn't work, I was thinking of adding an --rclone-switches switch which would take a quoted string of switches as pass then to the rclone copy/move/sync/delete commands.

cjnaz commented 5 years ago

See the --rclone-args switch added in rclonesync.py V2.6. You can try to pass in the --copy-links switch, but my testing was not encouraging. Please post/share your results. I'll leave this issue open for now.

katchy3132 commented 5 years ago

The switch is the best way to do it . Great. But it does seem have some problems as you said.

$ rclonesync.py Dropbox: /home/yo/Dropbox   --verbose --filters-file ~/.dropbox-rclone-filters --rclone-args --copy-links --first-sync
2019-04-11 16:10:20,592:  ***** BiDirectional Sync for Cloud Services using rclone *****
2019-04-11 16:10:20,624:  Synching Path1  <Dropbox:>  with Path2  </home/yo/Dropbox/>
2019-04-11 16:10:20,624:  Command line:  <Namespace(Path1='Dropbox:', Path2='/home/yo/Dropbox', check_access=False, check_filename='RCLONE_TEST', config=None, dry_run=False, filters_file='/home/yo/.dropbox-rclone-filters', first_sync=False, force=False, max_deletes=50, no_datetime_log=False, rc_verbose=None, rclone='rclone', rclone_args=['--copy-links', '--first-sync'], remove_empty_directories=False, verbose=True, workdir='/home/yo/.rclonesyncwd')>
2019-04-11 16:10:20,624:  Using filters-file  </home/yo/.dropbox-rclone-filters>
2019-04-11 16:10:20,625:  ***** Cannot find prior Path1 or Path2 lsl files.
2019-04-11 16:10:20,625:  ***** Critical Error Abort - Must run --first-sync to recover.  See README.md *****
katchy3132 commented 5 years ago

Also, I wasn't able to do it in the rclone config.

https://github.com/ncw/rclone/issues/661

cjnaz commented 5 years ago

The --rclone-args --copy-links has to be last on the command line. Move the --first-sync before the --rclone-args.

katchy3132 commented 5 years ago

Ah . That now seems to be working. I creating links on Linux and the file appeared as the full file on Windows. Deleted the file on Windows and the corresponding link was deleted.

Seems to be as expected.

cjnaz commented 5 years ago

I'll close this one. Pls open a new issue if anything come us.