How do I copy files from a Sun Solaris to an external hard drive


I have a external hard drive(USB connected to my sun solaris 10 server)....It see's the drive and I"m trying to copy data from sun solaris machine to the external hard drive. What commands do I use to do this...

Do I use ufsdump or just use  cp to copy  the files.
Who is Participating?
omarfaridConnect With a Mentor Commented:
the steps were given in earlier posting:

- partition the external disk, run

then choose number that corresponds to external disk
then choose p(artition)
then select a slice to set start and size
save and exit

- then create a file system on the new slice using newfs command, e.g.

newfs /dev/rdsk/c0d6t0s1 (put the real disk slice name)

- then mount the new slice with the command mount, e.g.

mount /dev/dsk/c0d6t0s1 /mnt

- run

ufsdump -0f - /path | (cd /mnt ; ufsrestore xf - )

- if your system is more than one file system then you need to create as many as partitions on the new disk as above
Brian UtterbackPrinciple Software EngineerCommented:
Unless there is something unusual about the files, just use the cp command.
anthonyAuthor Commented:
I copying the entire Sun file system...

Can just do cp /dev/rmt/c1t0d0s0 /rmdisk/unnamed_rmdisk
Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

Brian UtterbackPrinciple Software EngineerCommented:
Are you sure you meant /dev/rmt and not /dev/dsk or /dev/rdsk?  No, you don't want to use cp if you are copying the
whole disk like that. In that case ufsdump would be a better choice, but the external disk  should already be formatted with a UFS file system.
you need to have the disk partitioned (use format command) and then create a file system on the selected partition (use newfs) and then mounted on a dir (use mount) and then you can use ufsdump and ufsrestore to copy files from your system filesystems to that new file system
Brian UtterbackPrinciple Software EngineerCommented:
It would be a good idea if you explained exactly what you are trying to accomplish.
anthonyAuthor Commented:
I'm coping the entire sun file structure on the external hard drive...How can I ufsdump commands to point to the external hard drive..
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.