当前位置:网站首页>Fastdfs data migration operation record
Fastdfs data migration operation record
2022-07-07 00:58:00 【404 Eason Chan】
Migration scenario :
Because the online server is changed from Alibaba cloud to Baidu cloud , Online migration is required , It includes the migration of image files , The file system of the company uses fdfs
Server configuration
| Environmental Science | IP |
|---|---|
| Alibaba cloud environment ( used ) | ali Public network |
| Baidu cloud environment ( new ) | baidu Public network |
Operation process
-----------
Check out the fdfs Operating state
[[email protected] ~]# ps -ef|grep fdfs
root 12719 1 0 01:25 ? 00:00:00 fdfs_trackerd /etc/fdfs/tracker.conf start
root 12917 1 51 01:29 ? 00:00:01 fdfs_storaged /etc/fdfs/storage.conf start
root 12927 12404 0 01:29 pts/1 00:00:00 grep --color=auto fdfs
Check out the store Catalog
[[email protected] ~]# ll /home/youxin/config/fastdfs/storage/store/data/00/00/
total 0
# You can see that there are no files in this directory at present
Stop the new environment storage process
[[email protected] ~]# fdfs_storaged /etc/fdfs/storage.conf stop
waiting for pid [12917] exit ...
pid [12917] exit.
[[email protected] ~]# ps -ef|grep fdfs
root 12719 1 0 01:25 ? 00:00:00 fdfs_trackerd /etc/fdfs/tracker.conf start
root 12986 12404 0 01:32 pts/1 00:00:00 grep --color=auto fdfs
Modify the new environment storage.conf file , take tracker_serve Medium ip The address is in the old environment ip
[[email protected] ~]# cat /etc/fdfs/storage.conf|grep tracker_server
# tracker_server can ocur more than once, and tracker_server format is
#tracker_server= New environment ip:22122
tracker_server= Old environment ip:22122
Here we need to pay attention to
Be careful storage.conf In file ,group_name、store_path_count It should be consistent with the old environment storage.conf Documents are consistent ;
[[email protected] ~]# cat /etc/fdfs/storage.conf|grep 'group_name\|store_path_count'
group_name=group1
store_path_count=2
# This is the configuration of the old environment
# Before the new environment is modified
[[email protected] ~]# cat /etc/fdfs/storage.conf|grep 'group_name\|store_path_count'
group_name=group1
store_path_count=1
# After the new environment is modified
[[email protected] ~]# cat /etc/fdfs/storage.conf|grep 'group_name\|store_path_count'
group_name=group1
store_path_count=2
If your old environment store_path_count If there is more than one, you need to create the corresponding storage directory , Otherwise, the next startup will report an error
store_path_count=2
# store_path#, based 0, if store_path0 not exists, it's value is base_path
# the paths must be exist
store_path0=/home/youxin/config//fastdfs/storage/store
store_path1=/home/youxin/config//fastdfs/storage2/store
Finally, start the new environment storage, At this time , Old server tracker It will go to the new server storage Synchronous data
[[email protected] ~]# fdfs_storaged /etc/fdfs/storage.conf start
[[email protected] ~]# ps -ef|grep fdfs
root 12719 1 0 01:25 ? 00:00:00 fdfs_trackerd /etc/fdfs/tracker.conf start
root 13185 1 31 01:47 ? 00:00:01 fdfs_storaged /etc/fdfs/storage.conf start
root 13201 12404 0 01:47 pts/1 00:00:00 grep --color=auto fdfs
adopt fdfs_monitor /etc/fdfs/storage.conf Check the corresponding storage Is the status yes active
# FDFS_STORAGE_STATUS:INIT : initialization , The source server that has not been synchronized with the existing data
# FDFS_STORAGE_STATUS:WAIT_SYNC : Waiting for synchronization , The source server that has synchronized the existing data
# FDFS_STORAGE_STATUS:SYNCING : Syncing
# FDFS_STORAGE_STATUS:DELETED : deleted , This server is removed from this group
# FDFS_STORAGE_STATUS:OFFLINE : offline
# FDFS_STORAGE_STATUS:ONLINE : On-line , Not yet able to provide services
# FDFS_STORAGE_STATUS:ACTIVE : On-line , Can provide services
Finally, check whether the new environment directory files are synchronized
[[email protected] ~]# ll /home/youxin/config/fastdfs/storage/store/data/00/00/
total 79984
-rw-r--r-- 1 root root 78258 Aug 23 2021 rB3kk2EjZtKAIlCWAAExsrbSCWM679.jpg
-rw-r--r-- 1 root root 55960 Aug 26 2021 rB3kk2EnapmAed5JAADamCemQ4Q843.png
-rw-r--r-- 1 root root 23527 Aug 26 2021 rB3kk2Enb_GARWUmAABb51Yzqbw61.jpeg
-rw-r--r-- 1 root root 91 Aug 26 2021 rB3kk2Enc-2AH88hAAAAW-pqB00981.jpg
-rw-r--r-- 1 root root 24695 Aug 26 2021 rB3kk2Enc2GAfzSSAABgdybmZVM109.jpg
-rw-r--r-- 1 root root 7352 Aug 26 2021 rB3kk2Enc3uACf49AAAcuM2IpaM836.png
-rw-r--r-- 1 root root 7352 Aug 26 2021 rB3kk2Enc4KAeonMAAAcuM2IpaM298.png
-rw-r--r-- 1 root root 7352 Aug 26 2021 rB3kk2Enc8WAJDXrAAAcuM2IpaM229.png
-rw-r--r-- 1 root root 7352 Aug 26 2021 rB3kk2EncMqASN6EAAAcuM2IpaM596.png
-rw-r--r-- 1 root root 7352 Aug 26 2021 rB3kk2EncQyAZJ-6AAAcuM2IpaM536.png
-rw-r--r-- 1 root root 7352 Aug 26 2021 rB3kk2Encu2AaGD_AAAcuM2IpaM304.png
-rw-r--r-- 1 root root 7352 Aug 26 2021 rB3kk2EncyCAJY8wAAAcuM2IpaM214.png
Finally, don't forget to put tracker_server Of IP Change the address back to the new IP
We need to pay attention to :
1. Communication between the old and new environments must be ensured ( That is, public network to public network Intranet to intranet )
2. Relevant firewall ports need to be released
3. New environment group_name、store_path_count It should be consistent with the old environment storage.conf Documents are consistent ( must ), Otherwise, it can't be synchronized
If you have any other questions, please leave a message in the comment area to discuss ~~~~
边栏推荐
- Dell Notebook Periodic Flash Screen Fault
- Article management system based on SSM framework
- Policy Gradient Methods
- Mujoco second order simple pendulum modeling and control
- Attention slam: a visual monocular slam that learns from human attention
- Deeply explore the compilation and pile insertion technology (IV. ASM exploration)
- Matlab learning notes
- 深入探索编译插桩技术(四、ASM 探秘)
- 【批處理DOS-CMD命令-匯總和小結】-字符串搜索、查找、篩選命令(find、findstr),Find和findstr的區別和辨析
- Data processing of deep learning
猜你喜欢

pyflink的安装和测试

Service asynchronous communication

Slam d'attention: un slam visuel monoculaire appris de l'attention humaine

Telerik UI 2022 R2 SP1 Retail-Not Crack

Memory optimization of Amazon memorydb for redis and Amazon elasticache for redis
Deeply explore the compilation and pile insertion technology (IV. ASM exploration)

【YoloV5 6.0|6.1 部署 TensorRT到torchserve】环境搭建|模型转换|engine模型部署(详细的packet文件编写方法)

学习光线跟踪一样的自3D表征Ego3RT

【批处理DOS-CMD命令-汇总和小结】-字符串搜索、查找、筛选命令(find、findstr),Find和findstr的区别和辨析

threejs图片变形放大全屏动画js特效
随机推荐
Installation and testing of pyflink
Meet the level 3 requirements of ISO 2.0 with the level B construction standard of computer room | hybrid cloud infrastructure
threejs图片变形放大全屏动画js特效
ZABBIX 5.0: automatically monitor Alibaba cloud RDS through LLD
dynamic programming
【批处理DOS-CMD命令-汇总和小结】-字符串搜索、查找、筛选命令(find、findstr),Find和findstr的区别和辨析
【软件逆向-自动化】逆向工具大全
Building a dream in the digital era, the Xi'an station of the city chain science and Technology Strategy Summit ended smoothly
接口(接口相关含义,区别抽象类,接口回调)
做微服务研发工程师的一年来的总结
mongodb客户端操作(MongoRepository)
paddlehub应用出现paddle包报错的问题
New feature of Oracle 19C: automatic DML redirection of ADG, enhanced read-write separation -- ADG_ REDIRECT_ DML
What is time
Summary of being a microservice R & D Engineer in the past year
深度学习框架TF安装
筑梦数字时代,城链科技战略峰会西安站顺利落幕
Chapter 5 DML data operation
Dell筆記本周期性閃屏故障
浅谈测试开发怎么入门,如何提升?