52.数据迁移
来源:互联网 发布:直播破解软件 编辑:程序博客网 时间:2024/06/06 01:36
Step1 : Mysql Dump
1.导出到远程主机mysqldump -h oldhost -u oldusername -poldpassword --single-transaction olddbname | mysql -h newhost -u newusername -pnewpassword newdbname
2.导出到本地mysqldump -h DBHOST -u DBUSER -pDBPASS --single-transaction DBNAME > data.sql
STEP2 : Transfer all Magento Files
2.Media Directory
STEP3 : Adjust the Magento Configuration
<host><![CDATA[HOSTNAME]]></host><username><![CDATA[USER]]></username><password><![CDATA[PASSWORD]]></password><dbname><![CDATA[DATABASENAME]]></dbname>
3.config file
!!!如果使用了 apc 缓存:必须改变prefixmagento 开启 apc cache 将代替 /var/cacheapc 对迁移一无所知,<prefix> 将告诉它属于哪个网站
Important note about caching! If you are using apc caching (<cache><backend>apc</backend> in local.xml) and are creating a copy of the installation on the same server, you MUST change the <cache><prefix> setting to a new value. The reason for this is that if apc cache is used, magento will save all cache entries in the apc itself instead of /var/cache directory. And the apc cache storage is the same for the whole server, it knows nothing about installations, and <prefix> setting is the only thing that can tell it which website each cache entry belongs to. If you have two sites running with the same prefix, some very strange and hard-to-find errors may occur like data from one shop appearing in another shop’s menus, spontaneous redirects to the other shops’ url in back-end, changing of settings in backend affecting the other installation etc, etc.
4.Copy Files
1.wget http://www.example.com/backup/local.xml...安全的做法:2.ssh3.scp -r username@example.com:/home/username/public_html/backup .
5.update data
path: value:web/unsecure/base_url http://[you_domain_here]/web/secure/base_url https://[your_secure_domain_here]/
with multiple stores you need also change:
path: value:web/unsecure/base_url http://[you_domain_here]/web/secure/base_url https://[your_secure_domain_here]/web/unsecure/base_link_url http://[your_domain_here]/web/unsecure/base_skin_url http://[your_domain_here]/skin/web/unsecure/base_media_url http://[your_domain_here]/media/web/unsecure/base_js_url http://[your_domain_here]/js/web/secure/base_link_url https://[your_secure_domain_here]/web/secure/base_skin_url https://[your_secure_domain_here]/skin/web/secure/base_media_url https://[your_secure_domain_here]/media/web/secure/base_js_url https://[your_secure_domain_here]/js/
select * from core_config_data where path = 'web/unsecure/base_url';select * from core_config_data where path = 'admin/url/custom';select * from core_config_data where path = 'web/secure/base_url';
6. !!! Delete the cache data !!!
7.Can’t login to Magento admin after migration
SET FOREIGN_KEY_CHECKS=0;UPDATE `core_store` SET store_id = 0 WHERE code='admin';UPDATE `core_store_group` SET group_id = 0 WHERE name='Default';UPDATE `core_website` SET website_id = 0 WHERE code='admin';UPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN';SET FOREIGN_KEY_CHECKS=1;
http://magento.stackexchange.com/questions/64967/cant-login-to-magento-admin-after-migration
8.Using a Custom Admin URL
http://docs.magento.com/m1/ce/user_guide/configuration/url-admin-custom.html
https://magento2.atlassian.net/wiki/display/m1wiki/Moving+Magento+to+Another+Server
0 0
- 52.数据迁移
- 数据迁移
- 数据迁移
- 数据迁移
- 数据迁移
- 数据迁移
- 数据迁移
- 数据迁移
- 数据迁移
- 数据迁移
- 数据迁移
- 数据迁移
- 数据迁移
- Redis数据迁移-键迁移
- HDFS_数据迁移&节点迁移
- iOS CoreData数据迁移-迁移管理器迁移数据
- 数据迁移方案(初)
- 数据迁移相关知识
- CSS学习 | 思维导图
- 路由选择RIP协议解析
- SDWebImage 3.8.1 开发文档 原文链接:http://www.cnblogs.com/wendingding/p/5110732.html
- Access跨数据库查询
- 编程能力提高-----C/C++指针详解
- 52.数据迁移
- 1065. A+B and C (64bit) (20)-PAT甲级真题
- HashMap Hashtable区别
- Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError
- 转:poj 1664 放苹果 将m个相同的苹果放进n个相同的盘子中,盘子允许空,有多少种方法
- 彻底理解PHP的SESSION机制
- error: 'TASK_UNINTERRUPTIBLE' undeclared (first use in this function)和error: 'TASK_NORMAL' undeclare
- fork编程之exec函数详解
- Spring配置文件编写