利用dd指令遠端備份為ISO檔及還原成硬碟 (Linux, Unix, Solaris等適用)
遠端備份A(主機)的硬碟為ISO檔並儲存到B(File Server)的/backup目錄下
備份成ISO檔並丟到File Server:
Step1:SSH進入到欲備份的A主機下指令 (Linux)
Step2:dd if=/dev/hda | gzip -9 -c | ssh user@server_host dd of=/backup/hda.img.gz
Solaris 大概像以下的語法
/usr/local/bin/dd if=/dev/dsk/c1t0d0s2 | /usr/local/bin/gzip -9 -c | /usr/local/bin/ssh user@server_host /bin/dd of=/backup/c1t0d0s2.img.gz
從遠端File Server的ISO檔還原到本機硬碟
Step1:從一台裝上硬碟的Server, SSH進入到B(File Server)
Step2:ssh user@server_host zcat /backup/hda.img.gz | dd of=/dev/hda
如果該還原主機沒有作業系統,可採用 knoppix 之類的LiveCD來開機, 再綁上IP即可進行還原或備份
資料來源:
http://taiwanwolf.blogspot.com/2009/04/ddiso-linux-unix-solaris.html
文章分類
- 爬山 (3)
- 參考文章 (3)
- 鳥事 (5)
- 報稅 (1)
- AIX (2)
- ajax (1)
- BCB (3)
- C/C++ (2)
- cloudera (3)
- DISK (1)
- ftp (1)
- Fuse (2)
- gdb (2)
- hadoop (13)
- hdfs (8)
- HPC (2)
- hypertable (12)
- iOS (1)
- iscsi (1)
- JAVA (2)
- KFS (5)
- kickstart (1)
- KVM (2)
- LAMP (2)
- linux (2)
- Lion (1)
- LVM (2)
- mapreduce (3)
- mpi (3)
- mpich2 (4)
- msgpack (2)
- mysql (2)
- nfs (1)
- openmp (2)
- OS (1)
- OSX (2)
- others (5)
- PBS (1)
- performance_tuning (3)
- php (3)
- phplist (3)
- programming (27)
- REST (2)
- RHCA (6)
- rhel (13)
- rhel6 (4)
- scp (1)
- shell_scripts (2)
- snowleopard (2)
- Solaris (6)
- ssh (1)
- syslog (1)
- t-442-1 (4)
- torque (1)
- ubuntu (2)
- VNC (1)
- watercolor (5)
- windows (1)
- yum (1)
沒有留言:
張貼留言