Preserving file permissions with dump and restore

Jerry McAllister jerrymc at
Wed Feb 6 15:34:35 UTC 2008

On Wed, Feb 06, 2008 at 12:44:49AM -0500, Francois-Xavier Charpentier de Beauville wrote:

> Wojciech Puchar wrote:
> >>Hi,
> >>
> >>I have a box with three hard drives:
> >>/dev/da0 - dedicated to the OS
> >>/dev/ad4s1e - data drive - mounted as /store
> >>/dev/ad5s1e - hold a backup of /dev/ad4 - mounted as /backup
> >>
> >>I used 'dump' to backup everything from /store to /backup with the 
> >>following command:
> >>dump -0aun -f /backup/fullbackup /store
> >>
> >>As expected, the result is a dump file called 'fullbackup'
> >>
> >>Then I tested a restore, by restoring the fullbackup file from 
> >>/backup to /store.  I did the following:
> >>1) made /store pristine: newfs -U /dev/ad4s1e
> >>2) mounted /dev/ad4s1e on /store
> >>3) cd into /store
> >>4) ran the command: restore -r -uv -f /backup/fullbackup
> >>5) remove 'restoresymtable' from /store
> >>
> >>Thanks in advance for your help
> >
> >you did restore as root? (i think so but just for sure)
> >
> >it is something wrong with restore then, i used it many times and it 
> >restore everything.
> >
> >
> >anyway - rsync is good tool to make exact copy of directory tree
> >
> Actually yes, I did restore as root.  All ownership info and permissions 
> are reset during restore, and none of the original permissions are 
> back.  This kind of weird since the OS drive hasn't changed.  So, there 
> are the same users setup on the system.  Any thoughts?

Well, dump/restore should result in permissions and flags and
everything being as before the dump.   I have done the equivalent
many many times and not seen any loss of permissions or flags or
change of ownership.

When the restore finished, did it ask you about setting owner/permissions
on . ?    If so, answer no.     That is the only thing I can think of.


> _______________________________________________
> freebsd-questions at mailing list
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at"

More information about the freebsd-questions mailing list