How to import files when using object storage as primary storage?

Nextcloud version: 16.0.5snap3
Operating system and version: Ubuntu 18.04
Apache or nginx version: Apache 2.4.41
PHP version: 7.2.24

Hi, I moved my Nextcloud installation to Digital Ocean in order to use a DO space as primary storage. That went very well, I didn’t have any issues.

Previously I had some bash scripts running, which copy files from servers of the users to their Nextcloud-Storage via rsync over ssh. This was relatively easy, because I only had to copy those files to /var/snap/nextcloud/common/nextcloud/data/username/files/ and let Nextcloud rescan all files.

Apparently this is not an option with the object storage as primary storage anymore. The /data directory stays always empty and I have no clue where this /tmp folder would be and if it looks for new files anyways.

So how can I add files from the command line when I’m using object storage as main storage? I already tried WebDAV, but since it’s on the same server, that didn’t work. Is there another API for something like this? Or an option in the config files I’ve overlooked? Or maybe a hidden “import folder” which can be used for this case?

I would be glad if someone can help!

P.S. Sorry for my English - I’m not a native speaker. :wink:

maybe rclone.org is helpful.

Thank you @Reiner_Nippes :wink:

I thought about it, but is this even compatible with those urn:oid files Nextcloud saves instead of the original folder structure? If I sync the files directly with the object storage I would have to handle this. This is why I prefer to save it “locally”.

Or maybe is there a way to avoid this file structure completely? When I use DO Spaces as an external source with Nextcloud I do see the whole file structure in the Space. Can it be done with DO Spaces as primary storage as well?

you use nextcloud as target not DO spaces.

i assume “S3 as primary storage” is for those fancy peta byte installations where a local file system can’t handle the amount of files and bytes. so there is not “locally”.

if you need to the access the S3 objects directly i think you have to use a S3 fuse mount tool like: GitHub - s3fs-fuse/s3fs-fuse: FUSE-based file system backed by Amazon S3