当前位置:网站首页>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 ~~~~
边栏推荐
- 学习光线跟踪一样的自3D表征Ego3RT
- 迈动互联中标北京人寿保险,助推客户提升品牌价值
- 深度学习之线性代数
- 【批處理DOS-CMD命令-匯總和小結】-字符串搜索、查找、篩選命令(find、findstr),Find和findstr的區別和辨析
- Explain in detail the matrix normalization function normalize() of OpenCV [norm or value range of the scoped matrix (normalization)], and attach norm_ Example code in the case of minmax
- windows安装mysql8(5分钟)
- How to judge whether an element in an array contains all attribute values of an object
- 深度学习之数据处理
- Lombok 同时使⽤ @Data 和 @Builder 的坑,你中招没?
- Advanced learning of MySQL -- basics -- multi table query -- joint query
猜你喜欢

Dell笔记本周期性闪屏故障

随时随地查看远程试验数据与记录——IPEhub2与IPEmotion APP

【软件逆向-自动化】逆向工具大全

第七篇,STM32串口通信编程
Deeply explore the compilation and pile insertion technology (IV. ASM exploration)
做微服务研发工程师的一年来的总结

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

threejs图片变形放大全屏动画js特效

深度学习之数据处理

stm32F407-------DAC数模转换
随机推荐
A brief history of deep learning (II)
深度学习之线性代数
Activereportsjs 3.1 Chinese version | | | activereportsjs 3.1 English version
Periodic flash screen failure of Dell notebook
stm32F407-------DAC数模转换
from .cv2 import * ImportError: libGL.so.1: cannot open shared object file: No such file or direc
第六篇,STM32脉冲宽度调制(PWM)编程
ActiveReportsJS 3.1中文版|||ActiveReportsJS 3.1英文版
What kind of experience is it to realize real-time collaboration in jupyter
Value Function Approximation
Batch obtain the latitude coordinates of all administrative regions in China (to the county level)
通过串口实现printf函数,中断实现串口数据接收
【软件逆向-求解flag】内存获取、逆变换操作、线性变换、约束求解
paddlehub应用出现paddle包报错的问题
Mujoco finite state machine and trajectory tracking
批量获取中国所有行政区域经边界纬度坐标(到县区级别)
Explain in detail the implementation of call, apply and bind in JS (source code implementation)
[Batch dos - cmd Command - Summary and Summary] - String search, find, Filter Commands (FIND, findstr), differentiation and Analysis of Find and findstr
【批处理DOS-CMD命令-汇总和小结】-跳转、循环、条件命令(goto、errorlevel、if、for[读取、切分、提取字符串]、)cmd命令错误汇总,cmd错误
Basic information of mujoco