Difference between revisions of "Moving database from live to test"
Jump to navigation
Jump to search
old>Admin |
old>Admin |
||
Line 1: | Line 1: | ||
== Database transfer == | == Database transfer == | ||
Choose ONE of the options below that best suits your requirements. | |||
=== Database transfer: Another MySQL server === | |||
Export data from LIVE server | Export data from LIVE server | ||
Line 8: | Line 11: | ||
mysql -uUSERNAME -pPASSWORD --force < dump.sql | mysql -uUSERNAME -pPASSWORD --force < dump.sql | ||
=== | === Database transfer: Same MySQL server === | ||
Export data from LIVE server | Export data from LIVE server |
Revision as of 21:33, 2 October 2013
Database transfer
Choose ONE of the options below that best suits your requirements.
Database transfer: Another MySQL server
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
Database transfer: 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
Import data to TEST server
mysql -uUSERNAME -pPASSWORD sandboxbase < dumpBase.sql mysql -uUSERNAME -pPASSWORD sandboxlive < dumpLive.sql mysql -uUSERNAME -pPASSWORD 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"