Please note: These steps are only partially tested.
If you had enabled file encryption, I have bad news for you: As the
config.php contains a secret key, the files cannot be restored.
If not, I would suggest following steps:
Backup what you currently have.
Download and extract a fresh copy of OwnCloud
Recreate the config as good as you can:
- Set the database type and path (as you have database file I would guess the database type is sqlite)
dbtableprefix to your prefix (default is
oc_). In doubt, look into your database.
datadirectory to your data directory
installed to true.
- Restore the data directory. It must have the same path as the old one, or OwnCloud won't find the files.
As you have lost the password salt, you have to set new passwords for all users.
occ command to reset the passwords:
$ sudo -u www-data php /var/www/owncloud/occ user:resetpassword admin
Enter a new password:
Confirm the new password:
Successfully reset password for admin
After you login, you should have file access again. If you cannot download the files and get 404 errors, the data directory is probably not at the same location as it was previously.