如何进行数据库迁移?

../../../_images/migration.png

迁移步骤

你必须遵循下面的3~4个步骤以进行数据库迁移。我们建议您至少实践这个步骤两次(如果你愿意的话,你也可以多做几次):首先,在将你的数据库发给我们之后,你需要知道你选择迁移的版本,而且必须进行测试,检查并确认数据正确以及过程正常;在测试验证通过后,你就可以准备实际的迁移。将你的最新版本的数据库发给我们,我们将再次应用该迁移步骤,然后你就可以获得迁移后的数据库以用于生产环境的安装和使用。

We remind you, that you are in charge of your database cleaning, and that the migration warranty concerns all certified modules only. If you made some specific developments and want to keep them, be sure that they are grouped in a certified module. (For further information, have a look at our OpenERP Publisher’s Warranty or contact our technical team at support@openerp.com or +32 81 81 37 00 if you want to certify your modules.)

迁移步骤

  • 第1步: 上传你的数据库
Create a backup of your database and upload it. You can anonymize your data before uploading the database. For further information, see 如何恢复数据库备份? and 如何保证数据库数据安全?.
  • 第2步: 我们迁移数据库操作,并做严格测试
Once we receive your database, we run our migration process and test your database.
  • If the migration process ended without any problem, you will receive an email within a few hours, with a link where you can download your migrated database. You may then go directly to step 4.
  • If the migration process does not end automatically, you will receive an email within a few hours, explaining that the migration process encountered some difficulties and that a manual intervention is necessary. More details are available in step 3.
  • 第3步: 我们特别针对你的数据库定制迁移处理
Our migration process is automated as much as possible, but some manual work may be necessary, depending on your data’s complexity. It is possible, during step 2, that the migration process did not complete correctly and that we need to customize our scripts for your database. This operation may take 2-4 weeks, depending on the complexity of your database. After the migration script adaptation, you will receive an email with a link where you can download your migrated database.
  • 第4步: 你重新部署迁移过的数据库
You can download your migrated database and reinstall it on your new OpenERP version. If you executed the anonymisation process at step 1, you will have to reverse it to recover your real data.

如何恢复数据库备份?

做为超级管理员的角色,你能够创建一个帐套,当然也能做下面的操作:

  • 备份数据库(帐套),
  • 删除数据库(帐套),
  • 恢复数据库(帐套).

All of these operations can be carried out from the menu File ‣ Databases... in the GTK client, or from the Databases button in the web client’s Login screen.

Tip

备份(复制)数据库(帐套)

To make a copy of a database, go to the web Login screen and click the Databases button. Then click the Backup button, select the database you want to copy and enter the super-administrator password. Click the Backup button to confirm that you want to copy the database.

Tip

删除数据库(帐套)

To delete a database, go to the web Login screen and click the Databases button. Then click the Drop button, select the database you want to delete and enter the super-administrator password. Click the Drop button to confirm that you want to delete the database.

Tip

恢复数据库(帐套)

To restore a database, go to the web Login screen and click the Databases button. Then click the Restore button, click the Choose File button to select the database you want to restore. Give the database a name and enter the super-administrator password. Click the Restore button to confirm that you want to install a new copy of the selected database. To restore a database, you need to have an existing copy, of course.

Tip

复制数据库(帐套)

To duplicate a database, you can:

  1. make a backup file on your PC from this database.
  2. restore this database from the backup file on your PC, and give it a new name.

This can be a useful way of making a test database from a production database. You can try out the operation of a new configuration, new modules, or just the import of new data.

A system administrator can configure OpenERP to restrict access to some of these database functions so that your security is enhanced in normal production use.

如何保证数据库数据安全?

我们提供了一个的选项,让您的数据通过我们的 anonymization 模块来隐匿起来.这个模块可以让你保持一个指定数据库的数据机密性。 这是非常有用的功能,在你要迁移数据的过程中保护您自己或您的客户的机密数据。其原理是,你运行一个隐匿数据的工具,它会隐藏你的 机密数据(它们被替换为’XXX’字符)。然后,您就可以发送已经经过隐匿的数据给你的数据库迁移团队。一旦你数据库迁移完成,可以还 原和恢复回以前的隐匿数据。

We suggest you to work on a copy of your database, so be sure to make a backup before starting the anonymisation process.

The first step is to install and configure the anonymization module. The menus are located in Administration ‣ Database anonymization.

Anonymization History

This is the history of all the anonymisation (and the reverse process) that occurred on a particular database.

Anonymize database

This is the wizard that will actually anonymise the database. This wizard is also responsible to reverse the anonymization process.

Anonymized Fields

Pre-defined fields

On module installation, OpenERP will create some fields considered as important to anonymise, these are:

  • Partner: Name
  • Partner: Reference
  • Partner Addresses: Contact Name
  • Partner Addresses: City
  • Partner Addresses: Street
  • Partner Addresses: Street2
  • Partner Addresses: Zip
  • Partner Addresses: Phone
  • Partner Addresses: Fax
  • Partner Addresses: Mobile
  • Partner Addresses: E-Mail
  • Invoice: Untaxed (amount_untaxed)
  • Invoice: Tax
  • Invoice: Total (amount_total)
  • Invoice: Total (check_total)
  • Invoice: Residual
  • Invoice line: Unit Price
  • Invoice line: Subtotal
  • Invoice move line: Debit
  • Invoice move line: Credit
  • Invoice move line: Tax/Base Amount
  • Invoice move line: Amount Currency
  • Invoice move line: Taxed Amount
  • Sale order: amount_tax
  • Sale order: amount_untaxed
  • Sale order: amount_total
  • Sale order line: price unit
  • Sale order line: discount
  • Purchase order: amount_tax
  • Purchase order: amount_untaxed
  • Purchase order: amount_total
  • Purchase order line: price_unit

The anonymised values are:

  • char field: xxx + record id
  • text field: xxx + record id
  • selection field: xxx + record id
  • integer field: 1
  • float field:  0.0
  • date field: 2011-11-11
  • datetime field: 2011-11-11 11:11:11

All attachment object contents are replaced by an empty string in the database.

Create new fields to anonymize

You also have the possibility to add other fields that you want to keep confidential. You have to create them manually.

First choose an object by using the popup (Object field). You can also enter the object model name directly into the Object Name field, if you know it. These two fields are linked to each other; fill out one of both and the other one will be filled automatically.

You then choose the field by using the popup (Field field). You can also enter the field name directly if you know it (Field Name field). These two fields are linked to each other in the same way as described above.

The State field values are:

  • Clear: the field values have their original status in the database
  • Anonymized: the field values are anonymised in the database
  • Not Existing: the field does not exist in the database. This is probably a field which comes from the module’s data file. For example, the data file creates some predefined anonymized fields, but the module might not be installed. These fields are ignored by the anonymisation process.