Hi,
I have a script like this one, very basic, just a command.
#!/bin/bash
rclone sync --update --verbose --transfers 30 --checkers 8 --contimeout 60s --timeout 300s --retries 3 --delete-before --low-level-retries 10 --stats 1s "/run/media/james/D/master/bin/targets/ipq806x/generic/" "mygdrive:OpenWrt_builds/IPQ806X_master"
and in the source I have a many files to copy and only one folder and that one don't need to be copied, so is it possible to do the transfert only for the files and not for the folder?
Or I need to add another command to the script like
rclone delete --verbose "mygdrive:OpenWrt_builds/IPQ806X_master/xxxxx"
Also, everyweek I have a new files in that source folder, which files are completely replaced by the new ones. So if I start the script, Do I need to use copy or sync to replace what is already in the destination path?
thanks
I hope it is pretty clear.
asdffdsa
(jojothehumanmonkey)
February 23, 2023, 1:32pm
2
you would want to use filters such as --include
, --exclude
, --filters
after each time you run rclone sync
, the dest is a mirror of the source.
if a source file has not changed, rclone does not copy
OK great, so exemple the folder packages
in the main folder needs to stay there, so it could be something like:
rclone sync --update --verbose --transfers 30 --checkers 8 --contimeout 60s --timeout 300s --retries 3 --delete-before --low-level-retries 10 --stats 1s "/run/media/james/D/master/bin/targets/ipq806x/generic/" "mygdrive:OpenWrt_builds/IPQ806X_master"
Where should I add the filter?
Thanks
asdffdsa
(jojothehumanmonkey)
February 23, 2023, 2:41pm
4
when using filters, which work only on the source, easier/safer to test using rclone ls
or add --dry-run
to the rclone sync command
to your command
1 Like
At my command yes, but to be sure
Like rclone sync --update --verbose - - exclude "package.zip - -...
?
asdffdsa
(jojothehumanmonkey)
February 23, 2023, 3:29pm
6
you can test the filter using rclone ls
1 Like
after many tests, my folder packages
is always sync and /or copied to my destination path..
rclone sync -v --exclude=packages "/run/media/james/D/ipq806x_builds/master/bin/targets/ipq806x/generic/" "mygdrive:OpenWrt_builds/IPQ806X_master"
EDIT: just got it with that;
rclone sync -v --exclude "packages/**" "/run/media/james/D/ipq806x_builds/master/bin/targets/ipq806x/generic/" "mygdrive:OpenWrt_builds/IPQ806X_master"
system
(system)
Closed
February 26, 2023, 7:02pm
8
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.