如何从分OS 7文件系统恢复数据

时间:2018-04-14 10:09:29

标签: amazon-web-services amazon-ec2 centos

我在AWS上有一个不运行Cent OS 7的AWS实例的备份/快照,我需要从该服务器获取我的数据(Mysql DB,php Files)。有什么可能的方法?

我尝试了一些方法,但这对我不起作用。

  1. 从实例创建一个图像,并从该图像/ ami创建一个新实例 结果:与之前相同(实例状态检查:失败)

  2. 从卷(15GB)创建快照,并将卷装入新的实例存储设备
    结果: (define-key global-map [(menu) (s)] 'cscope-find-this-symbol) (define-key global-map [(menu) (d)] 'cscope-find-global-definition) (define-key global-map [(menu) (g)] 'cscope-find-global-definition) (define-key global-map [(menu) (G)] 'cscope-find-global-definition-no-prompting) (define-key global-map [(menu) (=)] 'cscope-find-assignments-to-this-symbol) (define-key global-map [(menu) (c)] 'cscope-find-functions-calling-this-function) (define-key global-map [(menu) (C)] 'cscope-find-called-functions) (define-key global-map [(menu) (t)] 'cscope-find-this-text-string) (define-key global-map [(menu) (e)] 'cscope-find-egrep-pattern) (define-key global-map [(menu) (f)] 'cscope-find-this-file) (define-key global-map [(menu) (i)] 'cscope-find-files-including-file) ;; --- (The '---' indicates that this line corresponds to a menu separator.) (define-key global-map [(menu) (b)] 'cscope-display-buffer) (define-key global-map [(menu) (B)] 'cscope-display-buffer-toggle) (define-key global-map [(menu) (n)] 'cscope-history-forward-line-current-result) (define-key global-map [(menu) (N)] 'cscope-history-forward-file-current-result) (define-key global-map [(menu) (p)] 'cscope-history-backward-line-current-result) (define-key global-map [(menu) (P)] 'cscope-history-backward-file-current-result) (define-key global-map [(menu) (u)] 'cscope-pop-mark) ;; --- (define-key global-map [(menu) (a)] 'cscope-set-initial-directory) (define-key global-map [(menu) (A)] 'cscope-unset-initial-directory) ;; --- (define-key global-map [(menu) (L)] 'cscope-create-list-of-files-to-index) (define-key global-map [(menu) (I)] 'cscope-index-files) (define-key global-map [(menu) (E)] 'cscope-edit-list-of-files-to-index) (define-key global-map [(menu) (W)] 'cscope-tell-user-about-directory) (define-key global-map [(menu) (S)] 'cscope-tell-user-about-directory) (define-key global-map [(menu) (T)] 'cscope-tell-user-about-directory) (define-key global-map [(menu) (D)] 'cscope-dired-directory) [root@ip-172-31-27-110 /]# fdisk -l Disk /dev/xvda: 10.7 GB, 10737418240 bytes, 20971520 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x000b0301 Device Boot Start End Blocks Id System /dev/xvda1 * 2048 20964824 10481388+ 83 Linux

    Disk /dev/xvdb: 16.1 GB, 16106127360 bytes, 31457280 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x000b0301

    Device Boot Start End Blocks Id System /dev/xvdb1 * 2048 31455269 15726611 83 Linux# mount -t xfs /dev/xvdb1 /home/mnt
    # mount /dev/xvdb1 /home/mnt

  3. http://prntscr.com/j54j9l

1 个答案:

答案 0 :(得分:0)

您是否已经使用mkfs.xfs之类的文件创建了文件系统?我遇到了与上述相同的问题,而这正是我所缺少的步骤。在将分区安装到目录之前,需要确保已为分区创建文件系统。

此外,我相信mount命令的-t标志仅指定分区是什么文件系统类型,而不是实际创建该文件系统类型。