714
edits
PolyglotBot (talk | contribs) m (Adding interlang links (links to translated versions of this page in other languages) triggered by origin English page "Restores" update.) |
No edit summary |
||
| Line 11: | Line 11: | ||
{{Template用户手册}} | {{Template用户手册}} | ||
本页介绍如何还原Dolibarr的备份(如在硬盘被格式化后)。要了解如何进行完整备份,请参阅 [[备份]] 页面。 | |||
= 前提条件 = | =前提条件= | ||
要在干净的环境中进行一个完整的还原,必需: | |||
*拥有数据库的完整备份(例如,使用mysql的工具mysqldump把MySQL或MariaDb数据库备份到转储文件中)。 | |||
*拥有 documents 目录中所有文件的完整备份。 | |||
*拥有用于访问已备份的 Dolibarr 的管理员用户的登录名和密码。 | |||
=步骤 1 - 重新安装 Dolibarr 软件= | |||
如果您已经卸载了Dolibarr或因为使用新服务器而尚未安装Dolibarr,则应先安装Dolibarr,使其拥有一个新的干净的数据库。 | |||
需要使用与以前相同类型的数据库(MySQL、PostgreSQL...)。 | |||
= Step 2 - Restore documents = | 您可以安装您选择的任何Dolibarr发行版(Dolibarr、DoliWamp、DoliMamp、DoliDeb或任何其他的Linux发行版...);但是,它必须与备份期间使用的'''版本'''(vX.Y)'''完全相同'''(如果您想升级版本,建议稍后再进行)。 | ||
注意:如果备份是使用 Dolibarr 进行操作的,则备份的Dolibarr版本信息包含在数据库备份文件的名称中。 | |||
=Step 2 - Restore documents= | |||
On your new installed Dolibarr, go with an administrator user in the menu '''Home / System Tools / Restore'''. | On your new installed Dolibarr, go with an administrator user in the menu '''Home / System Tools / Restore'''. | ||
| Line 32: | Line 35: | ||
All you have to do then is to copy content of your saved directory of old documents files into this directory. | All you have to do then is to copy content of your saved directory of old documents files into this directory. | ||
= Step 3 - Restore the database = | =Step 3 - Restore the database= | ||
== MySql == | ==MySql== | ||
Copy the backup dump file into the same directory than the command '''mysql'''. | Copy the backup dump file into the same directory than the command '''mysql'''. | ||
| Line 57: | Line 60: | ||
===Troubleshooting=== | |||
=== Troubleshooting === | |||
[[File:Warning.png]] ERROR 1005 (HY000) at line 20: Can't create table `dolibarr`.`llx_accounting_account` (errno: 150 "Foreign key constraint is incorrectly formed") | [[File:Warning.png]] ERROR 1005 (HY000) at line 20: Can't create table `dolibarr`.`llx_accounting_account` (errno: 150 "Foreign key constraint is incorrectly formed") | ||
| Line 99: | Line 101: | ||
{{ToComplete}} | {{ToComplete}} | ||
= Step 4 - Use your restored Dolibarr = | =Step 4 - Use your restored Dolibarr= | ||
After command is finished, you can go on Dolibarr logon. | After command is finished, you can go on Dolibarr logon. | ||
Now you must use a login account that was existing when the backup was done. | Now you must use a login account that was existing when the backup was done. | ||
edits