Restoring backups and effect on GRUB

Robert Heller heller at deepsoft.com
Tue Aug 6 01:35:14 UTC 2019


At Tue, 6 Aug 2019 01:15:03 +0100 "Ubuntu user technical support,  not for general discussions" <ubuntu-users at lists.ubuntu.com> wrote:

> 
> On Mon, Aug 05, 2019 at 06:00:50PM -0400, Rashkae wrote:
> > One important thing to keep in mind, to get a full copy of your root
> > filesystem, you must re-mount it somewhere else.  It might seem
> > reckless, but in Linux, you *can* mount filesystems twice.  So, for
> > example, your rout filesystem is on /dev/sda2
> > 
> > mkdir /mnt/sda2
> > mount /dev/sda2 /mnt/sda2
> > 
> > Now you can back up the contents of the /mnt/sda2
> > 
> > The reason for this is that the root filesystem has many files, like
> > devices nodes under /dev that will not get backed up from / because they
> > are covered by udev mounted at /mnt.  There used to be some stuff in
> > /proc or /sys, I forget but that that seems to be gone now.
> 
> For the record, none of the stuff that's overmounted in that way can
> possibly have been relevant to anything for quite a few years; the
> initramfs mounts /dev (etc.) over the top before anything would see
> them.
> 
> In this case I think you're remembering something that might have once
> been necessary a very long time ago, but there's no need to perpetuate
> it these days.

Note: all of these "special" directories are on a different file system from
the *files* on /. /dev is a RAMDISK these days (population dynamically by udev
and friends) and /proc and /sys and so on are on special file systems on
special kernel "devices". Doing a backup/restore of / with "--one-file-system"
(or equivalent) won't touch those files.

> 

-- 
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Custom Software Services
http://www.deepsoft.com/  -- Linux Administration Services
heller at deepsoft.com       -- Webhosting Services
                                                                                                      




More information about the ubuntu-users mailing list