Make script which helps to upgrade from NAT module.

Needed functions:

  • Copy NAT table to NAT-ng table.
  • Copy 'nat_config' to 'nat_ng_config' variable.
CommentFileSizeAuthor
#2 nat-746590-upgrade-from-nat.patch2.44 KBanantagati

Comments

arlinsandbulte’s picture

Note:
Here is the procedure I used to upgrade from NAT 6.x-1.2 to NAT-ng 6.x-1.0.

  1. Set site to maintenece (off-line) mode so no changes happen while you are upgrading.
  2. Disable the NAT module
  3. Run the SQL query "RENAME TABLE nat TO nat_ng;"
  4. Run the SQL query "UPDATE `variable` SET `name` = 'nat_ng_config' WHERE `variable`.`name` = 'nat_config' LIMIT 1 ;"
  5. Enable the NAT-ng module. You WILL get an error message that NAT-ng tables already exist. Ignore. This is normal.
  6. Unistall the NAT module at '/admin/build/modules/uninstall.' You WILL get an error about a missing table. Ignore. This is normal.
  7. Take your site off of maintenence mode.

That should be all! It should now work! Enjoy!

anantagati’s picture

StatusFileSize
new2.44 KB

Attached patch will add 'Upgrade from NAT' tab on settings page.

Follow these steps to upgrade:

  1. Have NAT enabled (if NAT is not enabled tab for upgrading will not be visible)
  2. Go to 'admin/settings/nat-ng' and then choose 'Upgrade from NAT' tab or go directly to 'admin/settings/nat-ng/upgrade-from-nat'
  3. Confirm that you want to overwrite all your NAT-ng settings and data with settings and data from NAT module
  4. You can disable and uninstall NAT module

All settings and data should be now transferred and used by NAT-ng module.

anantagati’s picture

Version: 6.x-1.0 » 6.x-1.1
Status: Active » Fixed

Committed. Included in NAT-ng 6.x-1.1.

anantagati’s picture

Version: 6.x-1.1 » 6.x-1.2

User without 'Administer NAT-ng configuration' permission could upgrade. It is fixed now.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.