Start owncloud only if the data folder on a nfs mount is available


i have an owncloud 8.1.1 server whose data directory is a nfs mount.
Sometimes when starting the server my complete owncloud folder is wiped.
I assume, that owncloud starts before the mount is available and then wipes the files.

How can i configure owncloud to start only if the nfs mount is available?

best regards


A quite good idea would be to use a recent / supported ownCloud version first:

Hello Tom,

is the problem known or addressed in 8.1.1?

Wait a sec. Is this a for sure thing? Just setting up first NC server and it's using an external USB drive mounted in Ubuntu.

Is there a real risk that I can lose everything if one day the server reboots and the storage doesn't mount?

This will happen at least once. Maybe if the power gets a hit.



i think, this is a real risk.
Happened some times. No nice thing.

I'm guessing you mean how do you delay the start of Apache and MySQL until the NFS mount is mounted? This is more to do with how services are managed on your system, and what order they're started in. Look at how services are managed on your system, and consider delaying the start of Apache and MySQL or only starting them if the NFS mount is mounted.

Might be possible but i think you should upgrade such an ancient version anyway. :slight_smile:

I did also a short search on the documentation of ownCloud an stumbled over the following documentation where the behavior of ownCloud is explained once the datadirectory is missing:

1 Like

exactly - that's the question