# 系統損壞災難復原

檢查磁碟陣列狀態 mdadm -D /dev/md0

&#x20;移動到陣列上的備份目錄- 檢查備份:`fsarchiver archinfo backup.fsa`

```
cd /srv/dev-disk-by-label-data/SystemBackup/omvbackup
fsarchiver archinfo backup-omv-12-Sep-2019_08-38-27.fsa
```

**以新電腦使用新磁碟，透過網路復原系統**

sudo mount -t cifs -o username=kawsing,password=yourpass //120.115.4.160/systemBackup /mnt

**恢復到新磁碟**，在fsarchiver restfs步驟之前將grub和分區表（**.grubparts文件**）的備份寫入磁盤：

```
sudo apt install fsarchiver
cd /mnt
dd if=backup-omv-12-Sep-2019_08-38-27.grubparts of=/dev/sdx
fsarchiver restfs  backup-omv-12-Sep-2019_08-38-27.fsa id=0,dest=/dev/sdx
```

id = 0表示只是備份中的第一個文件系統將被恢復。我假設您只使用一個備份備份一個文件系統。\
\
重新啟動：`reboot`

```
dd if=backup-omv-19-Sep-2019_12-00-40.grubparts of=/dev/sda
1+0 records in
1+0 records out
512 bytes copied, 0.00213378 s, 240 kB/s

fsarchiver restfs backup-omv-19-Sep-2019_12-00-40.fsa id=0,dest=/dev/sda
Statistics for filesystem 0
* files successfully processed:....regfiles=92867, directories=15715, symlinks=4490, hardlinks=10, specials=16
* files with errors:...............regfiles=0, directories=0, symlinks=0, hardlinks=0, specials=0
```

&#x20;`backup-omv-18-Jan-2019_14-12-01.blkid`::這是`blkid`放在文件中用於提供信息的輸出。\
`backup-omv-18-Jan-2019_14-12-01.fdisk`::這是`fdisk -l`放在文件中用於提供信息的輸出。\
`backup-omv-18-Jan-2019_14-12-01.fsa`::這是fsarchiver文件。\
`backup-omv-18-Jan-2019_14-12-01.grub`::這是安裝grub的磁盤的前446個字節\
`backup-omv-18-Jan-2019_14-12-01.grubparts`::這是安裝grub的磁盤的前512個字節和分區表。\
`backup-omv-18-Jan-2019_14-12-01.packages`::這是`dpkg -l | grep openmediavault`放在文件中用於提供信息的輸出。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kawsing.gitbook.io/opensystem/andoid-shou-ji/untitled/xi-tong-bei-fen-yu-hai-yuan.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
