Having a [virtual|cloud] drive in which I could keep some common tools, old works’ backup, unfrequently used ISO images and things like that, is an issue that has been coming to my mind for so long.
As I was thinking in the order of hundreds of gigabytes, Dropbox was no longer an option for me. I decided to go for [ownCloud](https://owncloud.com. First I tried OwnCube, which I have to say it’s a great hosted option. However, as I have already a server in which I can host it myself, I went that direction and tried to learn something in the process.
I wanted to work in a local drive and then mirror it to that ownCloud volume, so it’s available via WebDAV or even through HTTPS if needed. I don’t mind accessing through a browser or even a smartphone if it’s necessary. That way, I can keep my usual workflow in local and, from time to time, mirror it to the cloud.
In that step, rsync is the tool that will for sure come to your mind. And you’re right.
Previously, when I used to sync to a simple UNIX remote folder, I did:
Now, with ownCloud, you can mount a WebDAV folder locally and then sync with a similar command. However, the default behaviour for ownCloud through WebDAV is not to keep all the metadata (creation date, for instance).
I was determined to have that as well, so after a bit of research I found rclone to be a perfect match. It has options to access ownCloud with the proper calls to have the needed metadata updated.
Let’s give a look at how to configure that:
Now you can check that it works by doing:
Now, replacing the previous rsync/SSH example I cited above, you can do this to achieve the same result with a WebDAV destination: