• FastDFS数据迁移


      参考:https://blog.csdn.net/frvxh/article/details/56293502

      FastDFS安装配置参考:https://www.cnblogs.com/minseo/p/10210428.html

      环境介绍

    需要同步的tracker:192.168.56.11
    需要同步的storage:192.168.56.12
    
    新的tracker:192.168.56.21
    新的storage:192.168.56.22
    

      停止storage进程

     systemctl stop fdfs_storaged
    

      修改storage配置/etc/fdfs/storage.conf

    disabled=false
    group_name=group1
    bind_addr=192.168.56.22
    client_bind=true
    port=23000
    connect_timeout=90
    network_timeout=90
    heart_beat_interval=90
    stat_report_interval=60
    base_path=/opt/fdfsdata/storage
    max_connections=256
    buff_size = 256KB
    accept_threads=1
    work_threads=4
    disk_rw_separated = true
    disk_reader_threads = 1
    disk_writer_threads = 1
    sync_wait_msec=50
    sync_interval=0
    sync_start_time=00:00
    sync_end_time=23:59
    write_mark_file_freq=500
    store_path_count=1
    store_path0=/opt/fdfsdata/storage
    subdir_count_per_path=256
    tracker_server=192.168.56.11:22122  #仅仅需要修改此行指向旧的tracker
    log_level=info
    run_by_group=
    run_by_user=
    allow_hosts=*
    file_distribute_path_mode=0
    file_distribute_rotate_count=100
    fsync_after_written_bytes=0
    sync_log_buff_interval=10
    sync_binlog_buff_interval=10
    sync_stat_file_interval=300
    thread_stack_size=512KB
    upload_priority=10
    if_alias_prefix=
    check_file_duplicate=0
    file_signature_method=hash
    key_namespace=FastDFS
    keep_alive=0
    use_access_log = false
    rotate_access_log = false
    access_log_rotate_time=00:00
    rotate_error_log = false
    error_log_rotate_time=00:00
    rotate_access_log_size = 0
    rotate_error_log_size = 0
    log_file_keep_days = 0
    file_sync_skip_invalid_record=false
    use_connection_pool = false
    connection_pool_max_idle_time = 3600
    http.domain_name=
    http.server_port=80
    

      启动storage

    systemctl start fdfs_storaged
    

      此时数据会同步,查看同步过程 提示ACTIVE则代表同步完成

    fdfs_monitor /etc/fdfs/storage.conf
    

      同步之前在旧的上面上传了一个文件 目录为/opt/fdfsdata/storage/data/00/00

      同步完成后在新的storage服务器上面相同目录有相同文件

      同步完成后修改配置文件/etc/fdfs/storage.conf仅需要修改一行指向新的tracker服务器

    tracker_server=192.168.56.21:22122
    

      进入storage文件目录修改

    cd /opt/fdfsdata/storage/data
    vim .data_init_flag 
    sync_src_server=          #留空即可
    

      重启storage

    systemctl restart fdfs_storaged
    

      web页面验证

    http://192.168.56.22/group1/M00/00/00/wKg4DFxmZ4SAbxeYAAAABelE2rQ516.txt
    

      fastdfs数据同步完成

  • 相关阅读:
    iOS开发UI篇—懒加载
    iOS开发UI篇—简单的浏览器查看程序
    iOS开发UI篇—transframe属性(形变)
    iOS开发UI基础—手写控件,frame,center和bounds属性
    iOS开发UI篇—Button基础
    Foundation框架—集合
    Foundation框架—字符串
    Foundation框架—结构体
    ios 工程配置统一增加类的前缀(知识点也只能算知识点)
    Runtime 函数 Swizzling 改变OC方法的调度顺序
  • 原文地址:https://www.cnblogs.com/minseo/p/10383894.html
Copyright © 2020-2023  润新知