大网数据广告活动
服务器运维问答

Owncloud disk crashed, data is safe, how to set up a new server

· 52CE 我爱测

Our Owncloud server's disk crashed, beyond repair. All the data is stored on mounted disks (RAID-1), and these seem intact. I have to confess that we don't have a backup of the configuration, as far as I can tell. Is there a way …

问题原文

原帖链接 · D.Bugger · CC BY-SA 4.0

Our Owncloud server's disk crashed, beyond repair. All the data is stored on mounted disks (RAID-1), and these seem intact. I have to confess that we don't have a backup of the configuration, as far as I can tell.

Is there a way to safely re-create an Owncloud server using existing data disks on Linux?

Update: screenshot

已采纳解答

原帖链接 · S. Biewald · CC BY-SA 4.0

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)
    • Set dbtableprefix to your prefix (default is oc_). In doubt, look into your database.
    • Set datadirectory to your data directory
    • Set 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.

Use the 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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-01-26)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。