• Linux --xfs 备份 恢复



    3.文件备份
    # xfsdump -f 备份存放位置 要备份文件路径

    xfsdump -f /opt/dump_1 /dump_test

    [root@donglian dump_test]# xfsdump -f /opt/dump_1 /dump_test
    xfsdump: using file dump (drive_simple) strategy
    xfsdump: version 3.1.7 (dump format 3.0) - type ^C for status and control

    ============================= dump label dialog ==============================

    please enter label for this dump session (timeout in 300 sec)
    -> dump_1 # 指定备份文件标签
    session label entered: "dump_1"

    --------------------------------- end dialog ---------------------------------

    xfsdump: level 0 dump of donglian:/dump_test
    xfsdump: dump date: Mon May 11 13:57:01 2020
    xfsdump: session id: 76054e9c-fc40-4b38-b8d5-cb53584388ae
    xfsdump: session label: "dump_1"
    xfsdump: ino map phase 1: constructing initial dump list
    xfsdump: ino map phase 2: skipping (no pruning necessary)
    xfsdump: ino map phase 3: skipping (only one dump stream)
    xfsdump: ino map construction complete
    xfsdump: estimated dump size: 36032 bytes

    ============================= media label dialog =============================

    please enter label for media in drive 0 (timeout in 300 sec)
    -> dump_test #指定设备便签(硬盘挂载名)
    media label entered: "dump_test"

    --------------------------------- end dialog ---------------------------------

    xfsdump: creating dump session media file 0 (media 0, file 0)
    xfsdump: dumping ino maps and 11 entries processed
    xfsdump: dumping directoriesree /dump_test/test/^C4 2020s offline) ]
    xfsdump: dumping non-directory files
    xfsdump: ending media filete: 0 seconds elapsed814-93b8-eb18f29b7bb7
    xfsdump: media file size 33208 bytesedia file size> ]
    xfsdump: dump size (non-dir files) : 5184 bytes excluded) ]
    xfsdump: dump complete: 15 seconds elapsed ... ]
    xfsdump: Dump Summary:st]# 1p) ]
    xfsdump: stream 0 /opt/dump_1 OK (success)
    xfsdump: Dump Status: SUCCESS


    3.1 不交互备份

    xfsdump -f /opt/dump_2 /dump_test -L dump_2 -M /dump_test
    # -L 指定文件标签 -M指定设备标签

    [root@donglian dump_test]# xfsdump -f /opt/dump_2 /dump_test -L dump_2 -M /dump_test
    xfsdump: using file dump (drive_simple) strategy
    xfsdump: version 3.1.7 (dump format 3.0) - type ^C for status and control
    xfsdump: level 0 dump of donglian:/dump_test
    xfsdump: dump date: Mon May 11 14:03:42 2020
    xfsdump: session id: 3771ab8a-6efe-4414-8a62-ac47ec18365d
    xfsdump: session label: "dump_2"
    xfsdump: ino map phase 1: constructing initial dump list
    xfsdump: ino map phase 2: skipping (no pruning necessary)
    xfsdump: ino map phase 3: skipping (only one dump stream)
    xfsdump: ino map construction complete
    xfsdump: estimated dump size: 36032 bytes
    xfsdump: creating dump session media file 0 (media 0, file 0)
    xfsdump: dumping ino map
    xfsdump: dumping directories
    xfsdump: dumping non-directory files
    xfsdump: ending media file
    xfsdump: media file size 33208 bytes
    xfsdump: dump size (non-dir files) : 5184 bytes
    xfsdump: dump complete: 1 seconds elapsed
    xfsdump: Dump Summary:
    xfsdump: stream 0 /opt/dump_2 OK (success)
    xfsdump: Dump Status: SUCCESS
    [root@donglian dump_test]#

    3.2恢复备份
    xfsrestore -f /opt/dump_1 /dump_test

    # xfsrestore -f 备份存放位置 要恢复备份文件路径

    [root@donglian dump_test]# xfsrestore -f /opt/dump_1 /dump_test
    xfsrestore: using file dump (drive_simple) strategy
    xfsrestore: version 3.1.7 (dump format 3.0) - type ^C for status and control
    xfsrestore: searching media for dump
    xfsrestore: examining media file 0
    xfsrestore: dump description:
    xfsrestore: hostname: donglian
    xfsrestore: mount point: /dump_test
    xfsrestore: volume: /dev/sdb1
    xfsrestore: session time: Mon May 11 13:57:01 2020
    xfsrestore: level: 0
    xfsrestore: session label: "dump_1"
    xfsrestore: media label: "dump_test"
    xfsrestore: file system id: 9b65ee97-f7fe-41f9-80fc-10ad38a0e999
    xfsrestore: session id: 76054e9c-fc40-4b38-b8d5-cb53584388ae
    xfsrestore: media id: b389bf7c-8ae3-4c81-84de-12650942a1aa
    xfsrestore: using online session inventory
    xfsrestore: searching media for directory dump
    xfsrestore: reading directories
    xfsrestore: 3 directories and 22 entries processed
    xfsrestore: directory post-processing
    xfsrestore: restoring non-directory files
    xfsrestore: restore complete: 0 seconds elapsed
    xfsrestore: Restore Summary:
    xfsrestore: stream 0 /opt/dump_1 OK (success)
    xfsrestore: Restore Status: SUCCESS
    [root@donglian dump_test]#

  • 相关阅读:
    vue比较模板来跟新数据
    iframe自适应高度
    springmvc接口ios网络请求
    spring mvc实现接口参数统一更改
    spring mvc实现自定义注解
    基于redis集群实现的分布式锁,可用于秒杀,定时器。
    java使用javax.mail进行免费的邮件发送
    前端图片压缩上传(纯js的质量压缩,非长宽压缩)
    java项目中的路径获取,request
    阿里云(腾讯云类似)服务器控制台配置开放所有的端口
  • 原文地址:https://www.cnblogs.com/donglian1/p/12868825.html
Copyright © 2020-2023  润新知