Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can ufsrestore restore files to a ZFS file system?

34 views
Skip to first unread message

Dave

unread,
May 10, 2008, 7:59:50 AM5/10/08
to
I have a Sun Blade 2000 running Solaris 10 update 5 which is fitted with
a pair of 137 GB FC-AL disks. One of the disks is used as /export/home
and has only one UFS file system on it.

I have created a level 0 dump of this file system using ufsdump and
saved it to a file which I've stored in a ZFS pool created with a pair
of 1 TB USB disks.

Can I destroy the data on the UFS file system, create a ZFS pool on that
disk, then restore the data from a file created with ufsdump? (The file
is stored on a mirrored pair of 1 TB USB disks). The fact the command
has *ufs* in the name rather suggests this is not going to be possible
and ufsrestore will not work.

Is there a recommended way to change from UFS -> ZFS? I see a few things
on the web, but most are dated 2005.

What else could be used to back up the UFS file system and restore it to
a file system created in a ZFS pool? Since its not a system disk, tar
might work, although I'd need to check any largfile issues, as there are
several files over 2 GB in size. Perhaps cp -pr or similar?


Andrew Gabriel

unread,
May 10, 2008, 8:41:57 AM5/10/08
to
In article <4825...@212.67.96.135>,

Dave <f...@coo.com> writes:
> I have a Sun Blade 2000 running Solaris 10 update 5 which is fitted with
> a pair of 137 GB FC-AL disks. One of the disks is used as /export/home
> and has only one UFS file system on it.
>
> I have created a level 0 dump of this file system using ufsdump and
> saved it to a file which I've stored in a ZFS pool created with a pair
> of 1 TB USB disks.
>
> Can I destroy the data on the UFS file system, create a ZFS pool on that
> disk, then restore the data from a file created with ufsdump? (The file
> is stored on a mirrored pair of 1 TB USB disks). The fact the command
> has *ufs* in the name rather suggests this is not going to be possible
> and ufsrestore will not work.

It will work -- ufsrestore just uses standard user level
filesystem interfaces to write files. (This is not true of
ufsdump, so ufsdump only works on ufs filesystems.) I'm not
certain what will happen with any extended attributes since UFS
and ZFS don't handle them the same way, but I don't imagine
anything else would do a better job of converting them either.

> Is there a recommended way to change from UFS -> ZFS? I see a few things
> on the web, but most are dated 2005.
>
> What else could be used to back up the UFS file system and restore it to
> a file system created in a ZFS pool? Since its not a system disk, tar
> might work, although I'd need to check any largfile issues, as there are
> several files over 2 GB in size. Perhaps cp -pr or similar?

I would stick with ufsdump/ufsrestore. I'm not sure anything
else will correctly deal with sparse files (likely end up as
non-sparse files occupying more disk space).

--
Andrew Gabriel
[email address is not usable -- followup in the newsgroup]

Dave

unread,
May 10, 2008, 9:30:25 AM5/10/08
to


Thanks a lot. I'll try that later today. If there are any problems, I
can always create the file system as ufs again.

I guess Sun should add the fact ufsrestore will work on zfs file systems
into the ufsrestore man page. I'll submit that as an RFE.

Oscar del Rio

unread,
May 10, 2008, 9:57:17 AM5/10/08
to
Dave wrote:
> I guess Sun should add the fact ufsrestore will work on zfs file systems
> into the ufsrestore man page. I'll submit that as an RFE.

ufsrestore can write to ANY filesystem, including nfs, tmpfs, zfs, etc

Alain

unread,
May 10, 2008, 10:42:26 AM5/10/08
to
Dave a écrit :

> I have created a level 0 dump of this file system using ufsdump and
Why not use pax ?
save: pax -w -f savefile.pax /export/home
restore: pax -r -p e -f savefile.pax


Dave

unread,
May 10, 2008, 1:14:20 PM5/10/08
to

I was not even aware of 'pax', although found the man page:

User Commands pax(1)

NAME
pax - portable archive interchange


Actually, as Andrew Gabriel said, it does work with ufsrestore. In fact,
I'm using ZFS on /export/home now, after restoring from a file created
with ufsdump.

Wolfgang

unread,
May 13, 2008, 4:16:15 PM5/13/08
to
Dave schrieb:

> Alain wrote:
>> Dave a écrit :
>>> I have created a level 0 dump of this file system using ufsdump and
>> Why not use pax ?
>> save: pax -w -f savefile.pax /export/home
>> restore: pax -r -p e -f savefile.pax
>>
>>
>
>
>
> I was not even aware of 'pax', although found the man page:
AFAIK:
pax is a sort of posix conform tar ...
0 new messages