What is the problem you are having with rclone?
I tried to use rclone rcat
to a OneDrive remote on a cloud instance. The reason was because I was running out of space on the VM's storage, so I figured I could tar
some files and upload them to cloud storage all in one go. I used a command like this:
tar -czf - /path/to/lots/of/files | rclone rcat my_onedrive:backups/from_vm.tar.gz
This failed - I don't have the exact error message in front of me, but it was clear that the reason was because the VM didn't have enough space to contain both the data and a temporary file. It looks like rclone tried to make a temporary file in /tmp
, which filled up the root filesystem completely, and rclone exited with failure with no data having been uploaded. So it looks like with OneDrive, the rcat
command doesn't actually work and rclone falls back to creating a local file before uploading. Unfortunately this meant I had to purchase a temporary additional block storage volume to place the file on.
I don't remember the specific sizes, but for the sake of example, assume the VM has 100GB of storage. There is only 10GB free. There are 30GB worth of files that are safe to delete from the VM but need to be archived, so rcat
seemed to be the natural choice. The folder in question contained tens of thousands of small files, all of which were highly compressible, so simply copying/syncing the files as-is with rclone would have both been inefficient since it would have required thousands of upload requests, thus hitting OneDrive API request limits, but also the files would be uncompressed on the remote, taking up extra space. Thus, the goal was to simultaneously tar, gzip and stream the files to a single file on OneDrive.
My actual question is: which remotes actually support the rcat
command, and can actually stream the data up to the cloud provider without any intermediate temporary files?
The documentation for rcat
simply states that the behavior will depend on the remote, and the OneDrive remote's page doesn't contain any specifics about rcat
or any mention of it not being supported.
Run the command 'rclone version' and share the full output of the command.
rclone v1.58.1-DEV
- os/version: alpine 3.16.2 (64 bit)
- os/kernel: 5.15.69-0-lts (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.18.6
- go/linking: static
- go/tags: none
Which cloud storage system are you using? (eg Google Drive)
In this specific case, OneDrive. But I'm looking for more generic advice as to how to figure out which remotes support which features, in particular rcat
.
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
tar -czf - /path/to/lots/of/files | rclone rcat my_onedrive:backups/from_vm.tar.gz
The rclone config contents with secrets removed.
[my_onedrive]
type = onedrive
token = redacted
drive_id = redacted
drive_type = personal
A log from the command with the -vv
flag
I would have to recreate the specific situation - i.e. trying to upload data with not enough free space on /tmp - if it's REALLY required that I get the exact error message let me know and I'll startup another VM instance and generate some test data, but as I stated I dealt with the issue by paying for additional storage in the VM, manually tar'ing the data, then uploading with rclone in a traditional fashion (rclone copy).