Difference between revisions of "Moving database from live to test"
Jump to navigation
Jump to search
old>Admin |
old>Admin |
||
Line 8: | Line 8: | ||
mysql -uUSERNAME -pPASSWORD --force < dump.sql | mysql -uUSERNAME -pPASSWORD --force < dump.sql | ||
=== Variant: Copy to same MySQL server === | |||
Export data from LIVE server | |||
mysqldump -uUSERNAME -pPASSWORD tsbase > dumpBase.sql | |||
mysqldump -uUSERNAME -pPASSWORD tslive > dumpLive.sql | |||
mysqldump -uUSERNAME -pPASSWORD tstest > dumpTest.sql | |||
Option: Create tables on TEST server | |||
mysql -uUSERNAME -pPASSWORD | |||
CREATE DATABASE sandboxbase; | |||
CREATE DATABASE sandboxlive; | |||
CREATE DATABASE sandboxtest; | |||
Import data to TEST server | |||
mysql -uUSERNAME -pPASSWORD --force sandboxbase < dumpBase.sql | |||
mysql -uUSERNAME -pPASSWORD --force sandboxlive < dumpLive.sql | |||
mysql -uUSERNAME -pPASSWORD --force sandboxtest < dumpTest.sql | |||
== Configuration changes == | == Configuration changes == |
Revision as of 21:29, 2 October 2013
Database transfer
Export data from LIVE server
mysqldump -uUSERNAME -pPASSWORD --databases tsbase tslive tstest > dump.sql
Import data to TEST server
mysql -uUSERNAME -pPASSWORD --force < dump.sql
Variant: Copy to same MySQL server
Export data from LIVE server
mysqldump -uUSERNAME -pPASSWORD tsbase > dumpBase.sql mysqldump -uUSERNAME -pPASSWORD tslive > dumpLive.sql mysqldump -uUSERNAME -pPASSWORD tstest > dumpTest.sql
Option: Create tables on TEST server
mysql -uUSERNAME -pPASSWORD
CREATE DATABASE sandboxbase; CREATE DATABASE sandboxlive; CREATE DATABASE sandboxtest;
Import data to TEST server
mysql -uUSERNAME -pPASSWORD --force sandboxbase < dumpBase.sql mysql -uUSERNAME -pPASSWORD --force sandboxlive < dumpLive.sql mysql -uUSERNAME -pPASSWORD --force sandboxtest < dumpTest.sql
Configuration changes
Run the following commands before you start the server
USE tslive; UPDATE systempolicy SET PolicyValue = 'false' WHERE PolicyName='serviceAutostart'; UPDATE systempolicy SET PolicyValue = 'true' WHERE PolicyName='smtpTestMode'; UPDATE systempolicy SET PolicyValue = 'localhost' WHERE PolicyName='smtpServer'; UPDATE systempolicy SET PolicyValue = 'localhost' WHERE PolicyName='applicationServer'; UPDATE systempolicy SET PolicyValue = 'http://localhost' WHERE PolicyName='applicationURL'; UPDATE systempolicy SET PolicyValue = WHERE PolicyName LIKE 'folder%'; UPDATE systempolicy SET PolicyValue = 'C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps' WHERE PolicyName='applicationBasePath';
Rebuild views
Ensure that views exist by rebuilding them
Designer > Modules > Admin services > RebuildViews
Troubleshooting
Server not started
- Check application server log files for information
- Tomcat
- Check xml descriptor is found in [TOMCAT]/conf/Catalina/localhost
- Check war file is unpacked correctly in [TOMCAT]/webapps
Cannot select fieldtype when adding or editing fields
- Run the following SQL command
USE tsbase; DROP VIEW IF EXISTS viewdatatypeselector; CREATE VIEW viewdatatypeselector AS SELECT systemdatatype.FeltTypeID AS `FeltTypeID`, concat(systemdatatypepackage.TypePrefix,': ',systemdatatype.FeltType) AS `FeltType` FROM systemdatatype JOIN systemdatatypepackage ON systemdatatype.PackageID = systemdatatypepackage.PackageID WHERE systemdatatype.IsSelectable = 1) ORDER BY systemdatatypepackage.SortOrder, systemdatatype.FeltType;
- Repeat the "Rebuild views above"