还原: Difference between revisions

Jump to navigation Jump to search
no edit summary
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用户手册}}


This page describe how to restore a backup of Dolibarr (for example after formatting your hard disk). To know how to do a complete backup, see page [[Backups|Backup]].
本页介绍如何还原Dolibarr的备份(如在硬盘被格式化后)。要了解如何进行完整备份,请参阅 [[备份]] 页面。


= 前提条件 =
=前提条件=
For a complete restore on a clean environment, we suppose that you :
要在干净的环境中进行一个完整的还原,必需:
* Have a backup of your database (into a dump file, done with mysqldump tool for example if you used a MySQL or MariaDb database).
* Have a backup of your document files directory.
* You know a login of an admin user you used before, when old Dolibarr backup was done.


= Step 1 - Reinstall Dolibarr software =
*拥有数据库的完整备份(例如,使用mysql的工具mysqldump把MySQL或MariaDb数据库备份到转储文件中)。
If you have uninstalled Dolibarr or not yet installed because you are on a new server, you must install Dolibarr as if you want to use it with a new clean database.
*拥有 documents 目录中所有文件的完整备份。
*拥有用于访问已备份的 Dolibarr 的管理员用户的登录名和密码。


Be carefull to choose the same database type than before (Mysql, PostgreSQL...).
=步骤 1 - 重新安装 Dolibarr 软件=
如果您已经卸载了Dolibarr或因为使用新服务器而尚未安装Dolibarr,则应先安装Dolibarr,使其拥有一个新的干净的数据库。


You can install any Dolibarr distribution of your choice (Dolibarr, DoliWamp, DoliMamp, any other Linux distribution...), however it must be exactly the same version (vX.Y) than the one used to make the backup. The version may be included in the file name of the database backup.
需要使用与以前相同类型的数据库(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.
714

edits

Navigation menu