What is the problem you are having with rclone?
--exclude-from
is specific to each directory.
Run the command 'rclone version' and share the full output of the command.
rclone v1.58.1
- os/version: ubuntu 22.04 (64 bit)
- os/kernel: 5.15.0-72-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.17.9
- go/linking: static
- go/tags: none
Which cloud storage system are you using?
b2
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
for i in etc var
do
rclone -vv --bwlimit 5M --local-no-check-updated --exclude-from /usr/local/etc/rclone.excludes --fast-list --transfers 12 sync /${i} ovtt001-crypt-sys-${i}:
done
The rclone config contents with secrets removed.
[bblaze]
type = b2
account = 007
key = mysupersecretkey
[ovtt001-crypt-sys-etc]
type = crypt
remote = bblaze:0vtt001-sys-etc-00
password = averystrongpass
password2 = anotherverystrongpass
[ovtt001-crypt-sys-var]
type = crypt
remote = bblaze:0vtt001-sys-var-00
password = averystrongpass
password2 = anotherverystrongpass
When iterating over a list of directories I am using only a single excludes file, in the form of:
vagrant/**
packer/**
influxdb/**
mysql/**
docker/**
I've found this will exclude /etc/vagrant
, /var/vagrant
, /etc/influxdb
, /var/influxdb
and so on. In my case I may want to exclude those directories from /var
, but include in /etc
(eg, /etc/vagrant
: yes, /var/vagrant
: no thank you).
While I could use a separate exclude file for each directory (eg, /usr/local/etc/rclone.excludes.etc
, /usr/local/etc/rclone.excludes.var
), I'm hoping to find a better suggestion as to how to do this more comprehensively.