Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Aug 2014 22:07:38 +0200
From:      Roland Smith <rsmith@xs4all.nl>
To:        Andrew Hamilton-Wright <AHamiltonWright@mta.ca>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Problems with dump and restore
Message-ID:  <20140812200738.GD7166@slackbox.erewhon.home>
In-Reply-To: <alpine.BSF.2.11.1408121641480.1074@qemg.org>
References:  <alpine.BSF.2.11.1408121255230.1074@qemg.org> <20140812193419.GB7166@slackbox.erewhon.home> <alpine.BSF.2.11.1408121641480.1074@qemg.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--wULyF7TL5taEdwHz
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Aug 12, 2014 at 04:48:17PM -0300, Andrew Hamilton-Wright wrote:
>=20
> > This is mentioned in the restore's manpage;
> >
> >     expected next file <inumber>, got <inumber>
> >             A file that was not listed in the directory showed up.  Thi=
s can
> >             occur when using a dump created on an active file system.
>=20
> True, but my understanding of snapshots is that it is supposed to
> eliminate exactly this problem, no?

Yes, it should. But while UFS is old and mature and one would expect most b=
ugs
to be fixed by now, relatively new additions like SU+J will probably have m=
ore
bugs. (No slight to the maintainers intended, BTW! FreeBSD is generally
rock-solid in my experience)

> >> Some questions then:
> >> - is anyone else using dump/restore as their main backup method?
> >
> > Yes, operating system filesystems like /, /usr and /var, which can cont=
ain
> > flags and hard links and such. These filesystem's aren't all that big, =
so
> > dumps are relatively quick.
>=20
> What options are you using?  Are you using dumplevels?

Generally I only use level 0 dumps for ease of restore. I use the following
script to make dumps from single user mode. To save on disk space I don't d=
ump
those parts of /usr that can be easily downloaded, like src and ports. This=
 is
accomplished by setting =E2=80=98nodump=E2=80=99 flags and using dump's =E2=
=80=98-h 0=E2=80=99 option.

Note that I've put /tmp on a separate filesystem; I need someplace to store
the dumps on. :-)

    #!/bin/sh
    # Shell script to perform dumps on all important filesystems.
    # This script is designed to run under single-user mode from /root.
    #
    # Author: R.F. Smith <rsmith@xs4all.nl>
    # $Date: 2014-04-13 20:05:32 +0200 $
    #
    # To the extent possible under law, Roland Smith has waived all copyrig=
ht and
    # related or neighboring rights to dodumps. This work is published from=
 the
    # Netherlands. See http://creativecommons.org/publicdomain/zero/1.0/

    export PATH=3D/sbin:/bin:/rescue
    export DDATE=3D$(date "+%Y%m%d")
    export DLVL=3D0
    export DDIR=3D/tmp

    # Enumerate the mount points to dump.
    MNTS=3D"/ /usr /var"

    echo -n "Setting nodump flags..."
    chflags nodump /usr/obj /usr/ports /usr/src /usr/local/texlive/2013
    echo "done."
    echo -n "Unmounting filesystems before dumping..."
    cd /root
    mount -u -r /
    umount -f /usr
    umount -f /var
    echo "done."

    echo "Performing level "$DLVL" dump for mount points "$MNTS"."
    for p in $MNTS; do
        case $p in
            '/') export FSNAME=3D/root;;
            *) export FSNAME=3D${p};;
        esac
        OUTF=3D${DDIR}${FSNAME}-${DLVL}-${DDATE}.dump
        # Set the dump command options.
        echo "Dumping $p to $OUTF"
        DCMD=3D"dump -${DLVL} -a -b 64 -C 32 -R -h 0 -f ${OUTF} "
        $DCMD $p
    done
    echo "Done making dumps."

    echo -n "Re-mounting filesystems after dumping..."
    mount -u -w /
    mount /usr
    mount /var
    echo "done."

> >> - does anyone have any advice that may help determine what may have
> >>    gone wrong?
> >
> > Try using restore's =E2=80=9Cdegraded=E2=80=9D mode (using the =E2=80=
=98-D=E2=80=99 option) and use the =E2=80=98-y=E2=80=99
> > option.
>=20
> I have started that running on a scratch device, and will report back with
> results.

Good luck!


Roland
--=20
R.F.Smith                                   http://rsmith.home.xs4all.nl/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 5753 3324 1661 B0FE 8D93  FCED 40F6 D5DC A38A 33E0 (keyID: A38A33E0)

--wULyF7TL5taEdwHz
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJT6nQKAAoJEED21dyjijPgP7wQAJfXlqm3RW20up6sXBvpcFxT
pOkwQhlFTNkFqKn8H9gMeBe+nptUBdlQ1ATDylH420VRuDxgvCRpncPDtWxpoNfi
Fm0gVhGmbqRvdMmCTHUBpFRn+bfR2bUTPA7pWwSMLsYZuN4lxnPo8/RkckyIgydB
/HU+4HO1RIuvPiGNBo+kMszxlYaYHyRpzhvarvg6pGj2+BFcpu8QMQihqytOrw2q
hvDGVBI3Q+zFkjq/pLQPOVy4kwqVk0F7d3PsZ/GORQsmIKcFOyLdo5yEvfkaVWsi
ORjvcLOBpYv0SWnefyy9Xavm+zefX7Ng6yryBHpTI38PBBZq6pXIOW4qlcc/4Xpq
e9zgI1swEDhGcZr7C2Gthu0Vo3Hs9dpJibAImpjefygFEqURXiv1A1GKGgvg+jMP
1OjSelM+HbzQT1BJriI27jqc51CUtmhJGIELkXHrqxEoO7HXxkkDloCvGTTdMWh5
6Uwa128qY1hAcY33DAbHtIt+9ZtZGZKeDq3rVp/MqX5HpQgGIu6y/FeedUN7FvyH
MGtvAXRTV87XfcjMDBE0+fyIksY/QI0bOwlAnkbMgXRnEMDtGxsgLwQe8VhG/7Df
BIeAvQEFHU02bkHAu0JCCU7yRet3V54eroMkxDVm7cwSHl8+7AyVW4Oj286s7+Im
0n/MvaYQDCjkDBmHxODO
=b4kF
-----END PGP SIGNATURE-----

--wULyF7TL5taEdwHz--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140812200738.GD7166>