Moving NATS
Article Topics: Setup
We at Too Much Media offer the service of moving your NATS installation to a new server; this can be done for a cost of $215. If you would like your server to be moved by TMM techs, please submit a support ticket.
Although we recommend that you use this service, we also offer instructions for moving your NATS installation by yourself.
The following instructions describe how to move NATS on your own. Although you can forgo our service fee by doing it yourself, please keep in mind that there will be an hourly charge for any support required during this process. The rate of support is $150/hr.
Setting up NATS on the New Server
Before starting your server move please consider the following:
1) Make sure you meet all of the Requirements.
2) If you use any Targeting or Exclude Rules in your Biller Cascades, you need to test the Maxmind GeoIP software. Please see our GeoIP article for more information on how to test GeoIP.
3)Please refer to the following wiki article for MySQL setup: MySQL Settings
MySQL must also be accessible from the CLI, which may require changes to the MySQL my.cnf file.
Ensure that the MySQL mode "NO_UNSIGNED_SUBTRACTION" is enabled.
Make sure InnoDB engine is supported with MySQL.
You can Run: "show engines;" in MySQL to check.
3) Copy all NATS files to your NEW server. You can use the program rsync to facilitate the process.
4) Please be sure to check to make sure all the correct symbolic links (symlinks) are set up in your nats/www/ directory. These symbolic links should be:
track
strack
qrtrack
ttrack
gallery
banner
include
If any of these symbolic links are not available or not set up correctly in your nats/www/ directory, please put in a support ticket
5) Get a NATS license for your NEW server. Please open a new ticket and tell us the MAC address of the new server.
6) Change the paths in the includes/config.php file to be correct on the NEW server.
$config['PROJECT_ROOT'] - needs to be the location of the nats directory (including trailing slash).
Example: /home/foo/nats/
$config['BANNER_ROOT'] - is usually the path to the banners directory in the nats directory (including trailing slash).
Example: /home/foo/nats/banners/
$config['WORKDIR'] - is usually the path to the work directory in the nats directory (including trailing slash).
Example: /home/foo/nats/work/
$config['PATH_TO_*'] - config settings need to modified if the specific programs in config name is located in a different directory.
Example: tar program can be located in /usr/bin/tar instead of /bin/tar
7) Change the MySQL connection information for the includes/config.php file on the NEW server so it can connect to the database on the OLD server, then test that NATS is working correctly by using the IP address of the NEW server.
At this point, NATS should work correctly on both servers and will use the database on the OLD server.
Moving the Database to the New Server
Important: Your NATS program will be down during these steps.
1) Shut down the database on your OLD server. This will make NATS stop working for the time being.
2) On the OLD server, remove the NATS cronjobs for the installation you are moving
There will be two cron entries you will need to remove. Here is an example of what the entries will look like:
3) Copy the database to your server.
Please ensure the TRIGGER settings under the nats database user got transferred over from OLD database to NEW database. If the database user/host has changed from the OLD database to the NEW database, you may need to re-create the triggers with the correct user and host.
4) Change the config.php file on your NEW server to use the NEW database and check that NATS is working correctly.
5) Change the config.php file on your OLD server to connect to the NEW server's database.
6) If you use the NATS database for authentication, please ensure that you change your authentication to use the NEW database. Then test signing in to make sure everything is working properly.
7) On the NEW server, add the NATS cronjobs for the installation
At this point, NATS should work correctly on both servers and will use the database on the NEW server.
Set up Crons and Billers
Cron
1) On the NEW server, set up the cron entries using the correct paths to NATS and php:
2) Please make sure that the php mail function or the mail function that you are trying to use is working.
You can test a mailer by going to the Mass Mailing Admin, adding a new Mailer, and selecting the "Send Test" option to send a test email to yourself.
If you are using the emails for affiliates and/or members, complete a sign-up and once the initial transaction has been processed, the member and/or affiliate should get the email.
Learn more about setting up automatic emails when a member joins in our Mailing Members after a Join article.
Biller
1) First, inform your billers about your new IP address as this is necessary for your polls to run.
If you are using Epoch, please have your host setup a new user on the NEW database and setup the following grants for the following tables:
For more information on Epoch's setup, please see the Instructions
If you are using WTS, please let them know of the NEW work directory. It should be /<path to nats>/nats/work
If you are using CCBill, you need to update the IP for Datalink.
If you are sending cross sales, please make sure to inform the receiving NATS install and have them update their cross sale allowed IP's.
If you are using Centrobill, please ensure they whitelist your new server IP for Centrobill's ip_list.php to work properly
Additional Updates to Your config.php
If you perform internal cross sales you will need to update the config.php/config_override.php file to use the IP address of the new server
1) Update all XSELL_<biller>_SECURE_IPS variables to include the IP of the new server
2) Remove the old servers IP address from all XSELL_<biller>_SECURE_IPS
3) If you have MEMCACHE set up, make sure that you set it up in the new location or disable it entirely.
4) If you are using NATS API, update ADMIN_API_ALLOWED_IPS with new IP(s) and remove OLD servers IP.
Switch the DNS
Contact your host to have them switch the DNS name to the NEW server.
Important: Please ensure your linkdomains are also changed to point at the NEW server. If the linkdomains are still pointing at the OLD server, your linkcodes and join forms will not work.
After the DNS switch
1) Ensure all NATS domains are pointing to the NEW server including all of your linkdomains.
2) Ensure the crons are turned off on the OLD server.
3) Turn off the connection to the NEW database on the OLD server.
4) Open a new ticket so we can update your NATS license.
Final Checklist
Run a test through ALL of your billers.
Ensure Transactions can be processed
Make sure your authentication is working by logging in to your member's area after a new signup.
Make sure that the PHP version of ChartDirector appropriate to your OS and its fonts directory is installed in the PHP Extensions directory.
Wait a day and verify everything still works properly
Last updated
Was this helpful?