Backup with Snapshots on NAS enough because of potentially open transactions

Maybe someone of you could help me.
I have owncloud running in a docker container on my NAS. The NAS is making snapshots, thus database and data folder are maybe having a backup good enough to restore both if something is wrong.
Or isn’t that enough because of the database if there is traffic at the moment of the snapshot, thus open transactions.

Because of that I also integrated a cron job making sql dumps.
I’ve copied that dump together with the complete owncloud folder to another nas and restored everything.
I could login accordingly but I am not able to see my files.

But I should see the files, right when I made a restore of the database and using the complete owncloud folder.
Or is that way not working?
But maybe the problem is somewhere located regarding the external drives. On my productive system I have added Dropbox and a SMB drive. The SMB drive is not available on the system I have tried to restore owncloud.
And interestingly other extensions were not available although I replaced the completed data folder.

So maybe somebody could help in these questions behind that behavior

  1. Is it enough to use the NAS snapshots to restore the data folder and database although there are maybe open transactions once the snapshot is done?
  2. Shouldn’t it be enough to restore a manual owncloud database dump and the data folder or are there additional data anywhere on the database folder or the nas?
  3. Or is there maybe a bug that the external storage leads to the behaviour not seeing any files?

Server configuration

Operating system:
Running on a qnap nas in docker
Web server:
PHP version:
ownCloud version: (see ownCloud admin page)
Updated from an older ownCloud or fresh install:
fresh install
Where did you install ownCloud from:
docker hub
Signing status (ownCloud 9.0 and above):

Thank you so much!

The second case is correct. You need to put ownCloud in maintenance mode (so nobody can upload new files), create your mysqldump, and take ownCloud out of maintenance mode, for a total complete backup.

When you restore your ownCloud you need to restore mysqldump, ownCloud data & configuration.

For restoring the data, you need to make sure to configure everything the same, so that files and folders are in the exact same paths as before.

It can be, you can definitely try, however it’s close to impossible to tell where the exact data cutoff point is. Also, restoring a database from just the table files can be very hard, and sometimes fail.

Like I mentioned before, you also need to restore your configuration, like for example external storages. If data from your external storages is now inside the native ownCloud storage, you can run a filescan, but you will lose sharing information.

As far as I know there is no way to migrate data from external storage to internal, without losing all metadata (shares, notes, …)

1 Like