Operating System - Linux
1828254 Members
2878 Online
109975 Solutions
New Discussion

Backup and restore command for linux

 
Leon Shen
Frequent Advisor

Backup and restore command for linux

Hi All,

Just want double confirm for tar command to backup file systems to tape and restore file systems from the tape are same as HP-UX as following ?

backup : tar cvf / /dev/rmt/c0t0d0DDS
restore: tar xvf /dev/rmt/c0t0d0DDS /

what is the complete command format for dd command to copy whole harddisk to another disk?


best regards
Leon
4 REPLIES 4
Stf
Esteemed Contributor

Re: Backup and restore command for linux

Backup : # tar -cvf /dev/rmt/c0t0d0DDS /
first destination then file to backup!!!
Restore : # cd
# tar -xvf /dev/rmt/c0t0d0DDS

For dd command:

# dd if=/dev/dsk/source of=/dev/dsk/destination bs=1024 ((block size)or 512 or 2048 as you want...)

Stf ;-)
Bharat Katkar
Honored Contributor

Re: Backup and restore command for linux

Hi,


dd and tar command are basic UNIX command and not differ in their sytax for different UNIX flavour. So go ahead and start using it as you were using it on HPUX,.

Regards,
You need to know a lot to actually know how little you know
Chris Xu
Trusted Contributor

Re: Backup and restore command for linux

Linux tar is a GNU version, which has some differences from the tar in HU-UX. The GNU tar has more options. Use manpage to see the details or just do:
Linux: tar --help
HP-UX: tar -h

Chris
Jan Sladky
Trusted Contributor

Re: Backup and restore command for linux

hi Leon

dd example dd if=/dev/hda5 of=/tmp/hda5backup

than you can view backup via loop fs

mount /u01/hda5backup /mnt/test -t ext3 -o loop

where the ext3 is the used fs


these tar command are same on HP-UX and Linux

(you can use -cvf -xvf as well not only cvf xvf;-)


rgds Jan
GSM, Intelligent Networks, UNIX