Hello everyone,
I would like to suggest a command to do the opposite of “rclone cat” (and which I tentatively name “rclone rcat” for obvious reasons), that will take everything fed into its stdin and write to a single file in the cloud, for example:
echo "Mary had a little lamb" > rclone rcat REM:DIR/SUBDIR/testfile.txt
would create (or overwrite) a file called “testfile.txt” and located at DIR/SUBDIR under the REM remote, with the contents “Mary had a little lamb”.
The usefulness of this becomes more apparent when one considers that many backup commands (tar, cpio, etc) usually produce a single output file, which is then written to a local file, magtape, or piped into ssh to store in a remote host. With the “rcat” command, rclone can be used to store it in the cloud just as simply, for example:
tar czspf - DIR_BEING_BACKED-UP | \ rclone rcat REM:BACKUPDIR/host_DIR_YYYYMMDD.tar.gz
In fact, I’m using rclone to backup large trees of directories, and given that many (most?) cloud services put some rather stringent throttles on the number of objects that can be created per second, when these large trees contain lots of small files it becomes a rather slow process. With the “rcat” command, I would then be able to use tar to just write it out in a single “file” and send it simultaneously into the cloud remote, making the whole process much, much faster.
If everyone (and specially @ncw) agrees this is a good idea, please let me know and I will create an issue in github for this.
Thanks in advance,
Durval.