What's the best (and simplest) way to make a system backup/image/snapshot?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
What's the best (and simplest) way to make a system backup/image/snapshot?
I'm contemplating an upgrade (or fresh install) from Xubuntu 16.04LTS to Xubuntu 18.04LTS and I've been duly warned to make a system backup/image/snapshot before attempting it. I have backed up my Home folder on Back in Time, but not the system I guess. What's the simplest way of making such a backup? Thanks.
Saving ...
A list of installed programs may help.
Entire image may help.
Only unique data that you have like home or download, documents and such may help.
Gparted can save a partition off.
Clonezilla and dd can assist in a full or partial image if you intend to return to 16. Otherwise it may not be easy to get unique data off the image.
Saving ...
A list of installed programs may help.
Entire image may help.
Only unique data that you have like home or download, documents and such may help.
Gparted can save a partition off.
Clonezilla and dd can assist in a full or partial image if you intend to return to 16. Otherwise it may not be easy to get unique data off the image.
Thanks jefro. That makes sense. I definitely need to make a list of installed programs. And I'm figuring doing the Clonezilla
full image can't hurt. What do you mean, though, about Gparted saving a partition off?
Thanks Abe. Unfortunately, with my lack of knowledge of terminal commands that seems pretty complicated to me.
No biggie Gregg, use a solution that suits you. But don't get scared of the CLI.
If you have chosen to stick with a *NIX distro, why not unleash its full potential ? Remember every command comes with a manual (and info) to show what it arguments are used for and few has examples too.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
For an upgrade you don't need to image the drive. Just back up /home, and any custom config files. Anyway, if you image the entire disk, you probably won't be able to mount the image. You'd need to restore it to a disk to really do anything with it.
Isos of your installed system are fine and dandy but there are other ways to think of backup. "dd" and "tar" and 'zip"
of a installed system. Booting your Ubuntu live CD.
Then format the drive partitions how you wish.
Move that zipped compressed file you dd made and uncompress it in / partition.
Shut down the live cd and computer. Reboot. you should now boot up to your old byte for byte copied system just like if you booted up a iso but instead of read only. It is also writable.
my saved command for what I describe that copys rub bootloader and the whole mess is. use sudo
the below command I use i give props to rubberman at linuxforums.com. It is not mine.
to zip up < /home is on root / partition to make this command simpler >
/media/disk is your external drive /media/sdb. system-image.gz is what you are inserting and zipping up in there.
to uncompress in my emptied linux formatted hard drive with a linux file system and partions.
in a live cd again . go into where you have that file sitting system-image.gz on you external usb drive
In case I left anything out. Here is the rest of my notes
Quote:
Boot up your Live Mepis DVD.
2. Open a terminal window on the GUI desktop.
3. Switch to the root account with the command su
4. Plug in the external drive. If it is recognized a disc icon will appear on the desktop. If it isn't then you will need to mount it manually. We'll assume it is auto-mounted. It should be mounted as /media/something where something may be "disk" or some other label. You will need that path to backup the system disc. Whatever you do, DO NOT mount or try to access the system disc at this time.
5. Assuming that the external drive was mounted as /media/disk, execute the following command in the command-line window:, refer to my command in upper part of this post to zip up your install.MBR, grub, and all.
Edit; in case the mount words confuse you. most DE show on the desktop the drive when it is plugged in. but it is not mounted yet. You can check with right click. if it says mount. Don't touch it.
That is what I mean by my mount words.
2nd Edit; If it says unmount because you have automount enabled for whatever reason. Unmount it with the right click menu then.
Distribution: Ubuntu Linux 16.04, Debian 10, LineageOS 14.1
Posts: 1,572
Rep:
When I used Ubuntu, I think it came with deja-dup as its backup utility. It was good. It could be opened in the Ubuntu settings area, where there should be a "backup" option. Or, it can be run via the command "deja-dup-preferences", which gives a GUI to do a backup. Just check that deja-dup is installed, via Synaptic or via your favourite package management tool.
No biggie Gregg, use a solution that suits you. But don't get scared of the CLI.
If you have chosen to stick with a *NIX distro, why not unleash its full potential ? Remember every command comes with a manual (and info) to show what it arguments are used for and few has examples too.
Thanks Abe. You're right. I'm getting a little better at using CLI. Slowly. lol
Isos of your installed system are fine and dandy but there are other ways to think of backup. "dd" and "tar" and 'zip"
of a installed system. Booting your Ubuntu live CD.
Then format the drive partitions how you wish.
Move that zipped compressed file you dd made and uncompress it in / partition.
Shut down the live cd and computer. Reboot. you should now boot up to your old byte for byte copied system just like if you booted up a iso but instead of read only. It is also writable.
my saved command for what I describe that copys rub bootloader and the whole mess is. use sudo
the below command I use i give props to rubberman at linuxforums.com. It is not mine.
to zip up < /home is on root / partition to make this command simpler >
/media/disk is your external drive /media/sdb. system-image.gz is what you are inserting and zipping up in there.
to uncompress in my emptied linux formatted hard drive with a linux file system and partions.
in a live cd again . go into where you have that file sitting system-image.gz on you external usb drive
In case I left anything out. Here is the rest of my notes
Edit; in case the mount words confuse you. most DE show on the desktop the drive when it is plugged in. but it is not mounted yet. You can check with right click. if it says mount. Don't touch it.
That is what I mean by my mount words.
2nd Edit; If it says unmount because you have automount enabled for whatever reason. Unmount it with the right click menu then.
Thanks a lot, rokytnji, for all the great info. I went to Redo and read the page and that does really look like something I could do. And thanks for passing along the commands.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.