Page 1 of 7 123 ... LastLast
Results 1 to 10 of 70

Thread: Any way to make a full clone and/or image of mounted running drive? (running 21.04)

  1. #1
    Join Date
    Feb 2010
    Location
    Kerala, India
    Beans
    251

    Question Any way to make a full clone and/or image of mounted running drive? (running 21.04)

    Windows 10 has Volume Shadow Service (VSS) that allows apps like Casper to make full images and bootable clones of Windows disks while they're mounted and running. Any apps do this for Ubuntu? I want to make images and clones of my main Ubuntu 21.04 drive while it's mounted and running.


    I'm using Timeshift to take regular daily system snapshots and that's working great. But I also want to make full images and clones without unmounting my main drive and without booting from a live USB stik.

    I read about something called Continuous Data Protection (CDP) and Linux Hot Copy, but it seems they only work on Linux/Ubuntu servers.
    Last edited by Advait; August 15th, 2021 at 01:06 PM.
    MSI Bravo 15 AMD Ryzen 7 4800H 15.6" 40GB A4DDR-212IN, 2TB nvme (Ubuntu 21.04) and 500GB nvme (Windows 10)

  2. #2
    Join Date
    Oct 2017
    Location
    City of Waterfalls-Ph
    Beans
    Hidden!
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Any way to make a full clone and/or image of mounted running drive? (running 21.0

    I think dd will work for this the native Linux Disk Coning I think. We also have
    PartImage PartClone Clonezilla.
    I think this tools can clone your data while your live on your O.S
    or you might want to simply sync your vital data to the cloud. It is more safer than you have it by your own.
    Or maybe there are some tools online you just have to study it for safety Cloning.
    Much better you have to read the instruction of the tool for more safer cloning.
    Good luck and Enjoy.
    corn ubuntuforums community.
    Open Source platform where the real world of human is here. Click here for Solve thread
    Rock n' Roll People.
    From: mike_08

  3. #3
    Join Date
    Apr 2014
    Beans
    804

    Re: Any way to make a full clone and/or image of mounted running drive? (running 21.0

    If you use LVM, BTRFS, or ZFS you can do a snapshot. Then mount the snapshot and back it up while the original is still humming away doing it's job.

    Are you sure a full clone is the way to go though? This isn't Windows.

    It's so quick to do a fresh install that you may be better off backing up certain things and dumping them into a fresh install. I recently started using duplicity to keep my crontabs and /etc folder backed up to an external drive. It also runs my /home/* and a few other specific places. I think it would be faster to restore from that than to try to do a full system clone / recovery.
    Last edited by Tadaen_Sylvermane; August 15th, 2021 at 03:18 PM.

  4. #4
    Join Date
    Aug 2013
    Beans
    4,726

    Re: Any way to make a full clone and/or image of mounted running drive? (running 21.0

    fsarchiver supports live "cloning" with the -a option providing that you don't alter the file system like installing/removing things during the cloning. fsarchiver is a lot more flexible than clonzilla since it copies files and the meta data only and is insensitive to detail drive configurations and in particular you can restore the backup to any drive with enough room for the contents. Clonzilla requires the target drive to be at least as big as the source even when the source is mostly empty, which is a show stopper for me. Also I don't think it allows live backup.

    fsarchiver has a gui based on qt, it is very convenient to use but with less options than the cli (e.g it doesn't have option to exclude directories)
    Last edited by monkeybrain20122; August 15th, 2021 at 08:08 PM.

  5. #5
    Join Date
    Aug 2013
    Beans
    4,726

    Re: Any way to make a full clone and/or image of mounted running drive? (running 21.0

    Quote Originally Posted by Tadaen_Sylvermane View Post

    It's so quick to do a fresh install that you may be better off backing up certain things and dumping them into a fresh install. I recently started using duplicity to keep my crontabs and /etc folder backed up to an external drive. It also runs my /home/* and a few other specific places. I think it would be faster to restore from that than to try to do a full system clone / recovery.
    Well if a bad update messes your system (like xorg) a fresh reinstall won't help. You'll get the same bad updated package that broke your system in the first place. And in general tedious to restore all your settings that way. (settings hacks may not include only those in /home)
    Last edited by monkeybrain20122; August 15th, 2021 at 08:13 PM.

  6. #6
    Join Date
    Apr 2014
    Beans
    804

    Re: Any way to make a full clone and/or image of mounted running drive? (running 21.0

    Fair enough. I've never had a bad update that I've been aware of of but I guess it can happen. Especially if a large number of ppa's are in use. Thank you for that.

  7. #7
    Join Date
    Feb 2010
    Location
    Kerala, India
    Beans
    251

    Re: Any way to make a full clone and/or image of mounted running drive? (running 21.0

    Quote Originally Posted by mIk3_08 View Post
    I think dd will work for this the native Linux Disk Coning I think. We also have
    PartImage PartClone Clonezilla.
    I think this tools can clone your data while your live on your O.S
    or you might want to simply sync your vital data to the cloud. It is more safer than you have it by your own.
    OK, thanks. I'm now researching DD command. So DD command can make a bootable clone of a mounted, running drive? I need this question answered before I can proceed. I'm reading thru the DD documentation and this is not made clear.

    Casper for Windows ran in the background and made bootable clones of my main drive as I simultaneously did other tasks on the pc. Can DD command do this?

    Also I'm now researching PartImage and PartClone to see of they can do what Casper did. UPDATE: PartImage does not support ext4. UPDATE: Partclone requires the partition to be unmounted.

    AFAIK, Clonezilla only works on unmounted drives. Let me know if this is incorrect.
    Last edited by Advait; August 17th, 2021 at 08:20 AM.
    MSI Bravo 15 AMD Ryzen 7 4800H 15.6" 40GB A4DDR-212IN, 2TB nvme (Ubuntu 21.04) and 500GB nvme (Windows 10)

  8. #8
    Join Date
    Aug 2013
    Beans
    4,726

    Re: Any way to make a full clone and/or image of mounted running drive? (running 21.0

    Quote Originally Posted by Advait View Post
    OK, thanks. I'm now researching DD command. So DD command can make a bootable clone of a mounted, running drive? I need this question answered before I can proceed. I'm reading thru the DD documentation and this is not made clear.

    Casper for Windows ran in the background and made bootable clones of my main drive as I simultaneously did other tasks on the pc. Can DD command do this?

    Also I'm now researching PartImage and PartClone to see of they can do what Casper did. UPDATE: PartImage does not support ext4.
    dd is the hardcore people's favourite, but it can destroy your system if not careful, also it takes a long time. So if you have to 'research' it you may as well use other tools (I would do some smaller projects to experiment and learn it if there is the desire and need, not by cloning your whole system)

    I really recommend fsarchiver if live cloning is your goal. I have done it many times. It is safe and light and quite easy to use and it is insensitive to low level stuffs like drive configuration as in clonzilla (which cannot do live cloning)
    Last edited by monkeybrain20122; August 17th, 2021 at 08:27 AM.

  9. #9
    Join Date
    Feb 2010
    Location
    Kerala, India
    Beans
    251

    Re: Any way to make a full clone and/or image of mounted running drive? (running 21.0

    Quote Originally Posted by Tadaen_Sylvermane View Post
    If you use LVM, BTRFS, or ZFS you can do a snapshot. Then mount the snapshot and back it up while the original is still humming away doing it's job.
    This is true, but using BTRFS and ZFS is beyond my technical ability. I tried to use Fedora 34 with BTRFS and it was a nightmare. Every time I tried to do anything in Fedora 34 I ran head long into some arcane technical problem that required many hours of googling and forum posting. Way too much for a newbie like me.

    Quote Originally Posted by Tadaen_Sylvermane View Post
    Are you sure a full clone is the way to go though? This isn't Windows.
    I want a full bootable clone on an external drive so in case my main drive goes bad, I can just open the laptop, pop in the cloned drive and easily continue my work. Casper for Windows did this super easy and with a beautiful easy newbie friendly GUI. Looks like Linux has nothing like Casper. Sigh...

    Quote Originally Posted by Tadaen_Sylvermane View Post
    It's so quick to do a fresh install that you may be better off backing up certain things and dumping them into a fresh install.
    As a newbie, doing a fresh install and getting my Ubuntu system back to where it is now would take 2-4 days of work.
    MSI Bravo 15 AMD Ryzen 7 4800H 15.6" 40GB A4DDR-212IN, 2TB nvme (Ubuntu 21.04) and 500GB nvme (Windows 10)

  10. #10
    Join Date
    Oct 2005
    Location
    Lab, Slovakia
    Beans
    10,442

    Re: Any way to make a full clone and/or image of mounted running drive? (running 21.0

    Looking at what you stated: ‘A copy of a running system’. I would only trust zfs or btrfs snapshots - those are designed to do exactly that. Other methods need you to shut down and reboot off different media.

Page 1 of 7 123 ... LastLast

Bookmarks

Posting Permissions

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