1

Is it possible to install a PostgreSQL/PostGIS database in an OneDrive-Cloud and access it with QGIS?

7
  • 4
    Even if it is technically feasible, unless your Internet bandwidth is measured in tens of gigabits per second, it's not going to end well. Sub-millisecond SSD seek times are generally sought after for databases; hundred to thousand millisecond access will cripple your database.
    – Vince
    Jan 2, 2022 at 20:21
  • 1
    Is "OneDrive-Cloud" a storage system (like Dropbox, Box etc) or a server system where you can run services?
    – Spacedman
    Jan 2, 2022 at 20:35
  • Thank you, i use Onedrive as a storage system (like Dropbox)
    – ruma
    Jan 2, 2022 at 20:54
  • ..or would an installation of qgis-server on onedrive be possible?
    – ruma
    Jan 2, 2022 at 21:19
  • 1
    You could put the storage of your PostgreSQL database into OneDrive, not the whole installation. The server would still need to run locally or on another cloud machine. Anyways, it would not be a reasonable plan to do this in any thinkable scenario. Jan 3, 2022 at 9:20

2 Answers 2

2

In Windows at least, OneDrive can be treated like a local disk, and (I think) the system keeps a local copy and syncs with the remote cloud storage transparently. So you could possibly install PostgreSQL and PostGIS to that OneCloud point.

Note that the server would still only be able to run on your system, its just that its storage back-end would be on a (probably locally cached) cloud service, and hence operations may be slow because of the network and the service speed.

Some other things may break this setup - databases can be fussy about their storage back-ends, requiring them to be on file systems with certain capabilities to stop processes corrupting the stored data. Network file systems often don't have these capabilities, and so running PostgreSQL on, say, an NFS-mounted drive might not be a good idea. If the OneDrive lacks capabilities required then this also might not be a good idea.

If you are considering this because you want an off-site backup of your DB, look at other PostgreSQL backup ideas and store the resulting backup files to your cloud storage. If you are considering this because you want to share your PostgreSQL database with other people then a) they'd still need to run PostgreSQL locally and b) sharing a DB storage back-end is a very bad idea anyway and likely to result in corruption of the data.

2
  • "operations may be slow because" -> They will be incredibly slow as latency on and from/to OneDrive is magnitudes slower than even on a 20 year old harddrive. Jan 3, 2022 at 9:23
  • 1
    @bugmenot123 on a cached OneDrive mount (assuming it works like Dropbox) you'll get disk speed. Syncing to the cloud happens in the background, so your disk and your OneDrive online won't be consistent at first. Intense DB use might cause high CPU use and eventual grinding of the file system and backlog of network requests to the cloud. I do not advise doing this at all, I only think it is possible.
    – Spacedman
    Jan 3, 2022 at 10:31
2

I do use a PostgreSQL/PostGIS database in an OneDrive-Cloud and access it with QGIS. I created a folder pg_data within the local OneDrive and specified it as the data storage destination along the PostgreSQL installation. It is actually a local folder that sinchronizes to the cloud on the background and I don't find it significantly slower or troublesome than when using any other local folder.

The problem, however, is trying to access the data from different devices. That would need difficult setups.

1
  • Thank you for your experience report. I have not yet tried to install a PostgreSQL/PostGIS database in a OneDrive cloud. At best, it is now worth a try.
    – ruma
    Nov 4, 2023 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.