Linux Talk | Full System Backups and Moving Linux from Machine to Machine
Vložit
- čas přidán 28. 08. 2024
- This video is an introduction to making full system backups and moving Linux from machine to machine. Please be sure to give EzeeLinux a 'Like' on Facebook! Thanks / ezeelinux
Check out www.ezeelinux.com for more about Linux.
Watch my video about using Grsync to backup personal files: • Linux Tip | Making Bac...
CloneZilla website: clonezilla.org/
GParted website: gparted.org/ind...
I use Macrium Reflect to create image back-ups of partitions or whole Linux system from a 'Rescue' UFD I made. The image is written to the same UFD or external HDD. Linux users think Macrium Reflect is only for a Windows image back-up, but it works equally well for Linux, as long as you intend to restore to the same machine or another with similar hardware.
Thank you for the work you do! it is very helpful. The tidbits such as the drivers needing to be reduced to open source for the clone to work on another machine are gems, reducing the nights of research to complete such a project. priceless.
You don't need any additional software to move linux... you can create entire disc, or separate partition images with the program called "disks" that is usually included, and you can restore that image to a hard drive using the same program running on a live session, it's that easy.
If you're more advanced user, you may be able to restore separate partition images to existing partitions, in any order, then you edit /etc/fstab file, to make sure that the system finds all the partitions, and you reboot into your system.
Thank you for your post. I'm new to Linux and have spent 8 hours trying various methods of cloning my HDD Linux disk to a smaller SSD, without any success. Read your post then everything changed. No pain no drama. The Disks utility allowed me to shrink the HDD's partition to the size of the smaller SSD (as the drive was mostly empty space anyway). And the disk utility allowed me to make an image of the now smaller HDD partition and deploy that image to my new SSD.
Success at last and my old HTPC is now rapid.
Many, many Thanks
👍👍👍
Relaxing advanced Linux tutorials to relax/sleep to
Who on these interwebs can explain as well as you do? Very clear explanation, well done. Subscribed...
Great video, Joe. I've saved my bacon more than once being able to just restore an image and having the home directory segregated off. One way I have done it in the past is actually have a rescue partition and I just simply copied all the files back and just rebuilt the /dev directory and was back in business using a live CD and another time straight from a broken system... I almost always use tar and make backups of different areas of my system, but i have used imaging tools as well and use external HDs. Documents and Home get backed up more often, system less often - because of the work involved I have in my system, reinstalling isn't the best option. Tar is nice because you just get a file easily, clonezilla makes it easier to do the whole thing. Again, I USE both, so I always have options.
Nice video. I find it always easier to backup my data and just reinstall Linux if needed. I keep a list of programs to reinstall and that about covers it. Remastersys was very handy over the years to create a respin of my installed system and that saves some time, but is unnecessary. One thing to be very mindful of when restoring your data to a new installation is the ownership and permissions of the data files. I always use the exact same username when reinstalling to prevent permission and ownership problems. One can always use the "chown" command as root to reset the ownership of files, but keeping the same username is easier. Also it is good to remember that different Linux distributions might use a different user ID number for the first user created and this can cause problems if one were switching Linux distributions and attempting to move data files back and forth as the user ID number changes and that could cause problems accessing files after moving them.
+Ez Sit All true. If you use a FAT32 or NTFS USB stick to backup your files there will be no ownership permissions on them at all. It won't matter. :)
True. However, the act of copying files from a non-native filesystem like FAT or NTFS to a Linux native filesystem will change the access and modify rights to "user only." This is not a problem if one copies the data files back from the backup as the user they intend to log into the system. However, if one copies their backups back as a live user or as root, then all the copied files will inherit the incorrect user ownership and permissions. This possibility exists even if one were to use a backup storage device formatted with a Linux native filesystem. Copying backup files to their destination should always be done while logged in as the user that should own the files.
very helpful, thank you!
thank you for your awesome videos! you are a great Linux-Teacher!
You can move a windows os from one pc to another. It might not work always but I can testify that it can work.
But why would you? That only leads to Windows being on two machine which is twice as bad as having it on one.
@@011081xxx9 WUHAuhahhahahah This is gold! :D
Why do you appreciate us clicking on the link?! we're the ones in need of help mate haha
Clonezilla!! it's over 9000!
In Gparted if you turn swap off, you should be able to resize it after you shrink other partition to make room, this worked for me in Lubuntu using Redo-backup
Hi Joe and thanks for your tutorial which is very well explained and useful .I am very pleased with your video,thanks once again
Hello @Joe Collins, I know this video is from 5 years ago, but is the part where you have to configure the /root, /home, and /swap partitions still relevant today when setting up Linux Mint 20? Also, let's say you do create a gold Linux Mint image to deploy onto multiple computers with different hardware; what do you do about the drivers?
Yes, you can break out the partitions with Mint 20. As for drivers, if all the hardware is the same than you can just install them. If not, don't install the drivers and then use driver manager to do it on each machine.
@@EzeeLinux Thank you for the help! By the way, according to the Mint IRC channel on Freenode, the latest version of Mint comes with a swap file that adjusts the swapiness based on how much RAM you have in your system. The automatic partitioning in Mint 20 does not include a separate /swap partition by default. So when it comes to manual partitioning, you don't need to create a separate /swap partition because that swap file already takes care of that for you.
@@dabblersbuffet You still can if you want to. Ubuntu/Mint will see the swap space at install and skip creating the swap file.
@@EzeeLinux Also, I know you can manage the drivers by means of the Driver Manager, but aren't there certain hardware drivers that are installed into the kernel that you have to remove as well?
I was going to use Clonezilla, but mention of Gnome Disks utility prompted me to give that a go instead.
Turned out to be easy enough - from a bootable USB stick of Linux, simply save an image of the bootable partition to a file on a spare disk, then write that image to the new disk. I'd made sure to edit the mount point of the new disk beforehand, as I doubt that Disks would have done that automatically. I probably missed a trick to reduce the size of the copy, but I erred on the side of caution and just imaged the whole disk, including empty space.
However, it worked; and from a modestly-used 240GB SSD I now have a barely-used 480GB boot drive.
Another thing that's working for me is an NVMe drive sitting in a PCIe (gen2) slot which is carrying a Win10 VM for now. Speedy, speedy, speedy in comparison to the last time I tried messing around with VMs a couple of years ago.
This setup will do until I kick the hardware up into the current decade, next upgrade.
Personally i keep everything in git, i have a shell script with the software that i use, and if i need to move to a different machine i just run the shell script and it configures and installs my entire environment while the work files are being cloned. No need to complicate it, i think the issue is that people look for unnecessary hacks and for my development environment i run timeshift before important configurations for example if i have to install a software that requires setting up paths just in case i screw something up..
i know this is an old video but you just helped me with something i was thinking about, was looking at making a disc image but i already had my files backed up so i think its easier to just reinstall.
Good info, thanks for posting.
I use systemback its the easiest way to make a bootable .iso of your complete system in 20 min with just running the program in your current system. but it only works for debian/ubuntu i have a video on it.
+Otherstuff I looked it up and it does seem to be a good solution for some users but others had difficulty. CloneZilla is not the simplest but it is very, very flexable and offers lots of options. Whatever works for you... :)
Joe Collins Clonezilla is a nightmare for a noob (yeah, me) to figure out. I’ve tried 3-4 times just last night and all I managed to do was drive myself to drink.
@Joe Collins,
can you explain more or even with example why swap partition at the end of disk could causes us unable to resize other partition, make new partition and stuff ?
thx
andrew
Mainly, it makes it difficult to clone the system to a new bigger disk. You can easily resize the /home partition but moving swap is more difficult. :)
THANKS--- would you plese do one on SNAPPER usage on DEBIAN???
What about backing up files and changing distributions?
My issue is that I have a bunch of different experimental toolchains for programming microcontrollers. I've spent days fooling around with things like ngspice, AVRdude, Altera Quartus, Arduino, 8051IDE, Eclipse, KiCAD, etc. Hunting down all of the dependencies and files again haunts my dreams. I'm on Lubuntu using a junk laptop with a single core and 2gb of RAM. Unfortunately I need to use GIMP for editing images of circuits I want to etch prior to printing and this computer is just not having it. I have a slightly better computer available now. I'd like to install Mint. Lubuntu is not my favorite look, but I really, really want to make the transition easier. How do I migrate everything to the new (to me) comp and keep all the countless details and files? I'm mostly worried about the dependencies and command line installed stuff that I don't even recall in detail. I've spent ages on stack exchange to sort out this stuff and I really don't want to experience that again. I'm no super penguin here. Any help or advice would be greatly appreciated.
-Jake
BTW Sub'd after watching. I am here from searching YT for 'migrating linux.' This upload was the top search result for me on the YT mob app.
Great video but I disagree with you that you can't move a windows OS from one computer to another. I've made a number of cloned SSDs (and disk images) with 'Macrium Reflect' which are interchangeable with a 2nd PC that I own and are still activated on both PCs. I find 'Macrium Reflect' much easier to use by the way. So far I can't get 'Clonezilla' to work on either windows OR Linux distros :( That's why I'm watching this video :)
not sure where you are on this, but gParted has been included in the software center on the Ubuntu distribution from the start. Didn't need to get it from a separate URL.
very interesting but can it be used to transfer operating system to a USB stick from VirtualBox to be bootable like doing arch in VirtualBox then transfer to a USB stick
No. If you want to do that then you'd need a tool like CloneZilla. :)
you can make disk image form linux instalation usb and event to network drieve.
23:05 in gparted you can't modify a drive that's mounted
hii Sapa Holliday,
how do you know the drive that Joe was messing with is mounted ? what shows you it is mounted ?
thx
andrew
andrew ysk 22:46 shows that it at least one partition on the drive is mounted.
This video goes with the "How To Do A OEM Install Of Ubuntu 16.04/Linux Mint 17.3" video(s)!
this is an old video hope you reply I have a dual boot win 10 with kali Linux but every year or so I do a factory reset on my windows 10 to start fresh you know.so first question will factory reseting my windows 10 delete my Linux? I assume so but I want to be 100% sure.if it does delete Linux.if I use the method used in this videos can I backup my Linux distro with its setting and configs then factory reset my windows 10 then reallocate my drive and do a dual boot again then restore my configs and settings and my distro generally.thanks for your reply in advance.sorry im commenting on an old video and its a long comment
I would like to ask if clonezilla is able to move server to server with multiple hard drive inside configure with raid 1? Course I try cloning the hard drive but when I try to boot from my clone hard drive it couldn't to into the linux GUI desktop instead it boot to the grub mode.
Hmmmm... That's a good question. I don't think cloning a RAID array would work the way you'd think, though.
Hey, you said you cannot use Proprietary drivers. I need Proprietary drivers, or my DE doesn't load, I've heard it is because of NVIDIA
It depends on what machines you're working with. You can uninstall drivers just before moving and install the new ones later. :)
I have linux mint 18.3 installed in a drive with the swap partition first and then the rest is mounted on root. I need more disk space so I decided to move the installation to a larger drive and this I wanna separate the root and the home folders. Is that possible without losing data?
I thought I could just back every thing up with rsync and then restore it on the new linux mint which will have separate partitions for root and home but now I'm not sure
I don't wanna risk losing all my data because it is not possible to restore the backup to a drive with a different partition scheme!
Help!!!
Backup everything onto an external hard drive and re-install. Load you data back when done. That's the best way to do what you want to. :)
@@EzeeLinux so u saying I should back up everything from the root of the system and restore it using, the difference in the partition schemes doesn't matter?
Also correct me if I'm wrong. I'll first make a partition mounted at the root, then swap and finally home. Is that the way to go?
Thank you for replying BTW:)
Backup /home... that's where all of you personal data is kept. you can reload it back into the new home partition.
@@EzeeLinux i also wanna retrieve the things under my root folder, like usr for instance. That's where Python's files are. I don't wanna lose those. I actually don't mind losing most of what is in my home folder. I just don't wanna lose my Python and node.js conf files!
So is there no way to do that?
I'm sorry if I'm disturbing you and I REALLY appreciate your help
@@opssheesh Just back it on up too and put it back where it was before after you re-install. :)
If I have Linux on a hard drive and I want to put the drive into another PC how can I do it.
Yes, if: 1. There's no UEFI and 2. it's a Debian based distribution.
@@EzeeLinux I'm using arch, when I boot in the new pc it's just puts /dev/sda2 and the files wih a pointer that keeps blinking. I didn't delete my proprietary nvdia drivers, could that be the problem?
I reinstalled grub from a live usb it didn't work same problem.
Thank you for the quick reply
@@stevo19991 Arch generally won't let you do that and I don't know why. Your best bet is to back up your data and re-install. :)
Why not use LVM And you will be able to resize partitions, and not have to worry about where they are on the desk.
LVM is a complicated mess... I work with people all the time who turn it on at install, don't know anything about it and then get their systems borked when it fails. No, thanks... :)
Joe Collins LVM It’s not that complicated at all if you take the time to learn it. In fact, it is a much better way to manage file systems.
Newbies... I work with Newbies who've never heard of LVM. To them, It's very complicated. :)
For linux mint. After installation how I can get root password? When I do $su root ask me for the password. What is the password?
Hi, interesting tutorial thanks. I am running out of space on my 500G hard drive, I have Windows 10 on one partition and Linux Mint Rosa 17.3 in another, in a Dual Boot set up. Would it be possible for me to use Clonezilla to clone my entire Hard drive to a 2TB SSD internal drive, and just boot from the new drive?
It is never a good idea to move partitions onto an SSD that way. Much better to format the SSD with a fresh install because the file system alignment is different for SSD and you'll lose a lot of performance if you set it up improperly. :)
@@EzeeLinux Thank you for the information, I wonder if I could clone the data to a new mechanical drive instead of an SSD, thanks, much appreciated.
@@HektorBandimar That you can o but be ready to repair the bootloaders. :)
@@EzeeLinux Thanks, I'll do it the way you suggested. :)
Hello great vid but i have severe issue with having no sound from Linux Mint 18.1 XFCE and came from cinnamon before moving to xfce "lighter weight dist." Ive tried absolutely everything for months to correct the issue in kernel and always do immediate updates in hope that they will get it sorted out... Audacity, Mixxx, ALSA/PAVUCONTROL/PULSEAUDIO/VOLTI, and apps that stream will receive signals and play videos/streams but zero output from laptop other than voice/mic from usb sound source into programs... I have to sync a ipad2 in order to hear these vids... I have been to hexchat/forums but advice/protocol received is not working... I do not understand what i have done wrong or if kernel is fighting mozilla/flash or something...? Thank you for any advice im not ever going back to win10 nightmares lost entire 500gig hard drive contents to the complete bewilderment of many far more technical know hows friends that also just had lost everything through win10 updates somehow and or dual boot/swap...
That's a hardware issue. I'd look at a new machine. Sound is pretty bullet proof in Linux unless something's wrong with the card. :)
Not an experts advice being puzzled about not being able to modify a drive that is mounted
I know this sounds crazy...but I installed Clonezilla, and it is nowhere to be found...not in the menu under "All Applications" nowhere...
You don't install clonezilla. You create a boot disk from the ISO and boot the machine you wish to clone from it. Read the documentation. :)
Can it back up all the hdd, then make a boot disk in that backup...I have nothing installed, just the bare Mint 18...I just don want to do the updates, and customize mint again...thanks for the help
Then why does it say it is installed...and not in the downloads folder?? I cant read the documentation unless I extract it...right?
I went to software manager, selected install, and it installed like a regular program, but it's not listed in the menu or anywhere, as a program and its not in the downloads folder. I went to software manager and selected to view all installed programs..and it was listed, with the green check mark by it...
www.clonezilla.org/
Nice Video ! How to do that in a Linux running in a VPS like Digital Ocean ?!
DO has mechanisms to do that... Check the documentation. :)
DO has a service to backup your Droplet to their specific service. My suggestion is to make a video teaching how to do this by yourself for all VPS services "like" DO, Linode, and others. If you search it in google you will see a lot of questions about backup and restore offline of VPS or cloud server. But thank you for your answer. :)
It would be hard to make a video about that because I don't use those services.
It takes 10 minute to install linux and 5 to install updates...
+the zizzu Yes. As I pointed out in the video, doing image backups ans such is the longer way to go. :)
Ana Rita
Wow 30 minutes? How many things you have in your home folder? o.o Cant you just put your /home in a partition or on a different hard disk??
+the zizzu It takes me two hours to copy all the data in my home folder... It depends on how much you hang onto, of coarse. :)
What about software? Say Spotify, Chrome VPNs etc? Wouldn't you have to reinstall it all? That would surely take longer.
there is a simple way to SSH into a box and then make a backup. I just forgot how to.
the question nobody has an answer for is! "HOW DO I CLONE TO A SMALLER
DRIVE!" this sounds irrational most think its impossible but i have done
it with windows and a cd made by the company that produced "maxtor"
hard drive that not only did it but would restore a dead disk! and was
free when you bought a drive from them supposedly it only worked with
maxtor drive but in fact it worked with any provided one was a maxtor.
but this was in the days of windows 2000 and im using linux! but i was
told that by using clonezilla/Gparted it was possible. whats important
to understand is that we are not talking about cloning a 100 to a 50
completly! we are talking about a 100 thats using 10% and then moving it
to a 50 so really its a 10 to a 50 which requires partitioning. you
turn your 100 into a 50 and then clone it! i think you repartition it
with Gparted and clone with clonezilla.
You can do that by shrinking the partitions BEFORE making a backup.... But... Clone style backups are a bit much for Linux when you consider that it's easy to re-install from scratch and just put the data back. It takes much less time and it's way more reliable. :)
There is need to take full backup in linux in short.
I need to talk to you on skype sometime as I have a problem with Ubuntu 14.04 I think it is. It is dual boot with Win 7 because I need windows for my Flight Sim Hobby. I know there is a small cost involved but it is imperative I do not hose my win 7 as it is very important to me. Thanks.
+:Clive-Albert :Dodd I don't support dual booting Linux with anything... I can't guarantee the stability of the system.
Joe Collins
Okay Joe thanks for replying, It's not effecting Win 7 just Ubuntu which I had loading without password, now needs the password I set but just keeps going back to password window, tried to reset password, it seemed to go okay but still returning back to password page, so I have no idea, will probably try to install over the top if that is possible. Thanks anyway.
+:Clive-Albert :Dodd Dual booting causes all kinds of strange issues that are hard to trace, just like the one you're describing. The only way to do it safely is to have Windows and Linux on completely separate drives. Even then, you have to deal with issues with the clock and the bootloader. Reinstall for now to fix this but start looking for a separate machine to run Ubuntu on.
Joe Collins
Thanks Joe I did not realize that dual booting would cause these types of problems. I have another dual boot machine which runs Win 7 and Linux Mint 17 and I don't have any problems with that installation at all. Thanks for the advice. Clive.
Xplane 10 works well in Linux. I haven't tried 11 yet
I forgot all about clonezilla. I was thinking of keeping a drive with an up to date linux OS all set up and ready to be cloned for boomers that need computer work done.
250gb kingston ssd's are 30 dollars each at the moment so the overhead is cheap. That's often more than they need and should keep them from infecting their computers.
Sysprep move windows to new hardware, never can do lies
Sysprep works - I've used various sysprep images hundreds of times and it always worked.
Clonezilla works but is simply the worst imaging program to use. Just about anything else is better.
Uhh, terrible virgocho.