Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Is there a reason not to back up a running root partition

  1. #1
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Is there a reason not to back up a running root partition

    Hi I use rsync to back up and sync my data partitions.

    For example typically like this to sync the /home dir:
    Code:
    mount /dev/sdb7  /mnt/sdb7
    rsync -azv --delete /home/  /mnt/sdb7
    umount /dev/sdb7
    That works well at end of day time I run it and it sync-updates /home to a second drive. Currently I do pretty much the same thing for the root partition by booting into CD Knoppix and update-syncing the root partition. I do that because I "assumed" it's not a good thing to sync a working root partition while it is "running". It's such a pain to boot a live CD to do it!

    Here's the question: was my assumption wrong -- could I sync the root partition from within my working computer?
    Last edited by swerdna; 03-Dec-2014 at 17:10.
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  2. #2
    Join Date
    May 2012
    Location
    Finland
    Posts
    2,004

    Default Re: Is there a reason not to back up a running root partition

    I do not see why not - the only files that you cannot access are ones that are created automatically by various daemons anyway.

    I do it all the time - I even piped a physical machine into a VMware VM via netcat - happily on the fly :3
    .: miuku #suse @ irc.freenode.net
    :: miuku@opensuse.org

    .: h​ttps://download.opensuse.org/repositories/home:/Miuku/

  3. #3
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,485
    Blog Entries
    15

    Default Re: Is there a reason not to back up a running root partition

    Quote Originally Posted by swerdna View Post
    Hi I use rsync to back up and sync my data partitions.

    For example typically like this to sync the /home dir:
    Code:
    mount /dev/sdb7  /mnt/sdb7
    rsync -azv --delete /home/  /mnt/sdb7
    umount /dev/sdb7
    That works well at end of day time I run it and it sync-updates /home to a second drive. Currently I do pretty much the same thing for the root partition by booting into CD Knoppix and update-syncing the root partition. I do that because I "assumed" it's not a good thing to sync a working root partition while it is "running". It's such a pain to boot a live CD to do it!

    Here's the question: was my assumption wrong -- could I sync the root partition from within my working computer?
    Hi
    Are you running btrfs on / is so backup the snapshots?
    https://btrfs.wiki.kernel.org/index....emental_Backup
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  4. #4
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: Is there a reason not to back up a running root partition

    Quote Originally Posted by malcolmlewis View Post
    Hi
    Are you running btrfs on / is so backup the snapshots?
    https://btrfs.wiki.kernel.org/index....emental_Backup
    Not running btrfs. This machine I use and need on and off all day, money income involved, so I need for it to be a low risk machine.
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  5. #5
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: Is there a reason not to back up a running root partition

    Quote Originally Posted by Miuku View Post
    I do not see why not - the only files that you cannot access are ones that are created automatically by various daemons anyway.

    I do it all the time - I even piped a physical machine into a VMware VM via netcat - happily on the fly :3
    Thanks Miuku
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  6. #6
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Is there a reason not to back up a running root partition

    On 2014-12-04 01:16, swerdna wrote:

    > Here's the question: was my assumption wrong -- could I sync the root
    > partition from within my working computer?


    My normal strategy is to do an image full backup (or xfsdump) of system
    partitions, sporadically, and then periodic rsyncs while running.


    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

  7. #7
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: Is there a reason not to back up a running root partition

    Quote Originally Posted by robin_listas View Post
    On 2014-12-04 01:16, swerdna wrote:

    > Here's the question: was my assumption wrong -- could I sync the root
    > partition from within my working computer?


    My normal strategy is to do an image full backup (or xfsdump) of system
    partitions, sporadically, and then periodic rsyncs while running.


    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)
    Thanks

    It occurs that I would need --exclude switch for a live sync because I don't want /mnt (4 partitions there) and /home (treated separately).
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  8. #8
    Join Date
    Nov 2013
    Location
    Kamloops, BC, Canada
    Posts
    3,974

    Default Re: Is there a reason not to back up a running root partition

    Quote Originally Posted by swerdna View Post
    Thanks

    It occurs that I would need --exclude switch for a live sync because I don't want /mnt (4 partitions there) and /home (treated separately).
    Yep, good thinking, A.

    I also tend to do something somewhat similar to what Carlos said. Regular weekly backups, more often at high-change times and before risky ventures, and also syncs of root and home. Even if one or two files are not correct because they were on a system running at the time, it comes in super handy when you discover you want one file or one chain of files:

    sync back or copy back those files, back in business in mere seconds or minutes.
    -Gerry Makaro
    Fraser-Bell Info Tech
    Solving Tech Mysteries since the Olden Days!
    ~~
    If I helped you, consider clicking the Star at the bottom left of my post.

  9. #9
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,345
    Blog Entries
    3

    Default Re: Is there a reason not to back up a running root partition

    Quote Originally Posted by swerdna View Post
    Thanks

    It occurs that I would need --exclude switch for a live sync because I don't want /mnt (4 partitions there) and /home (treated separately).
    I do that differently.

    I create subdirectories of "/mnt":
    Code:
    # cd /mnt
    # mkdir 1 2 3
    You can create others. Maybe even create "/mnt/root"

    If I want to backup the root partition, I would do something like:
    Code:
    # mkdir /mnt/root
    # mount --bind / /mnt/root
    and then I would actually backup "/mnt/root".

    The reason: A bind mount doesn't carry with it mounted file systems. So under "/mnt/root", the directory "home", "dev", "proc", "sys" etc will all be empty directories. That way you avoid backing up mounted file systems. When done, just use a "umount" to undo that mount.

    I do something similar with "/home". That's because I do use an ecryptfs private directory, and this trick excludes the mounted "/home/$user/Private", though its encrypted backing file "/home/$user/.Private" will be backed up.

    Backing up a bind mount is easier than using a bunch of "--exclude" options.
    openSUSE Leap 15.1; KDE Plasma 5;

  10. #10
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: Is there a reason not to back up a running root partition

    Quote Originally Posted by nrickert View Post
    I do that differently.

    I create subdirectories of "/mnt":
    Code:
    # cd /mnt
    # mkdir 1 2 3
    You can create others. Maybe even create "/mnt/root"

    If I want to backup the root partition, I would do something like:
    Code:
    # mkdir /mnt/root
    # mount --bind / /mnt/root
    and then I would actually backup "/mnt/root".

    The reason: A bind mount doesn't carry with it mounted file systems. So under "/mnt/root", the directory "home", "dev", "proc", "sys" etc will all be empty directories. That way you avoid backing up mounted file systems. When done, just use a "umount" to undo that mount.

    I do something similar with "/home". That's because I do use an ecryptfs private directory, and this trick excludes the mounted "/home/$user/Private", though its encrypted backing file "/home/$user/.Private" will be backed up.

    Backing up a bind mount is easier than using a bunch of "--exclude" options.
    I like this method, thanks, I'm going to try it out.
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •