UFS dump and restore


New Member

Reaction score: 2
Messages: 11


It is the first time I need some help to resolve a problem. I could not find an answer.
I want to copy my installation to an other UFS partition with dump and restore.

I use:
% uname -a
FreeBSD cmp8 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r273642: Sat Oct 25 21:37:27 CEST 2014  jwb@cmp8:/usr/obj/usr/src/sys/GENERIC  amd64
I made a dump with:
#dump -C16 -b64 -0uanL -h0 -f - /usr | gzip -2 > /mnt/spare/usrss.dump.gz

Now I want to restore this to an other partition mounted on /mnt/tmp
#gzcat /mnt/spare/usrss.dump.gz | ( cd /mnt/tmp && restore -ruf - )

restore gives the following error:
expected next file 2016460, got 2016459
cannot find directory inode 2014389
abort? [yn] y
dump core? [yn] y
Abort (core dumped)
When I look in /mnt/tmp I see my user directory content, but some directories do not have the same permissions. I have also copied my root partition. The copied system boots fine. The root user can do anything, but a normal user can do almost nothing because of the wrong permissions (for /lib and other directories. ).

I think there is something wrong with my original /usr directory, but
%fsck does not find anything.

Does anyone know how to correct the inode 2016459 that could not be found by restore?
Is there a way to know the directory name of inode 2016459?

Last edited by a moderator:


Beastie Himself

Reaction score: 3,683
Messages: 13,851

Was SUJ disabled before the dump? If the nodump flag is set on any files or directories, -h0 will skip them. Run the dump without -h0 to back up everything.


New Member

Reaction score: 2
Messages: 11

Tanks for your reply.

I have only softupdates enabled. I made the dump again without the -h0 option. Restore gives with the same error.
But now I did answer no to the question to abort the restore. There were a few other inodes not available.
In the man page I found also an interesting setmodes option to deal with aborted restorations.

When I boot my copied system the permissions are correct. Now I have a problem with KDE that shows only a black screen and a mouse pointer.

After some research I can answer my own question to get the directory name:

root@cmp8:/ # cd /usr
root@cmp8:/usr # find . -inum 2016459 -print
The file seems to be related to kde that does not work correctly. Lets look there:
/usr/local/lib/kde4/platformimports/touch/org/kde/plasma/components % ll qmldir
-rw-r--r--  1 root  wheel  983 Oct 10 09:47 qmldir
Restore seems to expect a directory, but it is a text file I can edit.

I will try to make an other dump without running KDE maybe that is the cause of the problem.
Last edited by a moderator: