Aravisian
Thu Jan 03, 2019 12:38:01 pm
Being unfamiliar with Linux and Terminal, I am prone to make disastrous mistakes. I have already had to wipe and reload... This may help others, as well.
I would like to start a process of backing up a clone image of my drive on a regular basis on an external drive that I can restore from in the event it is necessary. My plan is a bit complex. So, needless to say, I have a lot of questions. It may not need to be that complex.
I have written up a short guide for myself with the references I used listed in three websites at the top of the 'write up.' This 'write up' is pasted at the bottom of this post. You will notice some of the lines in it are copy and pasted from the source articles linked at the top.
Looking for someone more knowledgeable than myself that is willing to help myself and readers understand it and to execute it with good results. The back up; I think I have some rudimentary understanding of. The restore part- not so much.
First and most obvious question: When booting up to a restored clone image, would it be the same as if I booted up normally from the time period that the back up was made? As in, all my settings and tweaks would be in place, proper wallpaper on the screen and customization and software present?
First thing the sites tell you as that your backup drive must be equal to or larger than your source drive. That is a tall order on on po'boy like myself... Surely the backup drive needs to only be larger than than what I am using on my system, right? So if I am using a 16gig flash drive (which is much bigger than the space I am occupying on my hard drive), that should be sufficient, right?
Above it says from arch, "use tune2fs /dev/sdXY -U random". I am a mechanic. If you happen to be unfamiliar with mechanical and I say, "use a torque wrench to check your torque specs" you may just say, "yeah, sure, sure... thanks... What is a torque wrench, what are the specs and how do I do that?" I do not understand "use tune2fs."
I appreciate any help or insight offered. Hopefully, an efficient and useful 'restore' process can be created.
I would like to start a process of backing up a clone image of my drive on a regular basis on an external drive that I can restore from in the event it is necessary. My plan is a bit complex. So, needless to say, I have a lot of questions. It may not need to be that complex.
I have written up a short guide for myself with the references I used listed in three websites at the top of the 'write up.' This 'write up' is pasted at the bottom of this post. You will notice some of the lines in it are copy and pasted from the source articles linked at the top.
Looking for someone more knowledgeable than myself that is willing to help myself and readers understand it and to execute it with good results. The back up; I think I have some rudimentary understanding of. The restore part- not so much.
B.U. and Restore
https://wiki.archlinux.org/index.php/di ... g#Using_dd
https://wiki.archlinux.org/index.php/Dd ... nd_restore
https://www.makeuseof.com/tag/easily-cl ... -image-dd/
sudo terminal first
dd if=/dev/sd(X) of=/dev/sd(Y)
sd(X) is primary drive and sd(Y) is secondary. Use Gparted to find disk names. In my case, sda is my hard drive. So:
dd if=/dev/sda of=/dev/sdY
dd if=/dev/sda of=/dev/sdb bs=64K conv=noerror,sync status=progress
Note:
Be careful that if the output partition of= (sdb1 in the example) does not exist, dd will create a file with this name and will start filling up your root file system.
bs= increases block size for faster file transfer. noerror causes utility to continue to read if there is an error instead of halting.
sync fills errors blocks with zeroes to keep data offset in sync.
status=progress shows statistics of transfer and Estimated Time of Completion. Increasing block size also increases risk of an error filling larger blocks.
Note:
To regain unique UUIDs of an ext2/3/4 filesystem, use tune2fs /dev/sdXY -U random on every partition.
RESTORE:
sudo dd if=/dev/sda conv=sync,noerror bs=64K | gzip -c > /path/to/backup.img.gz
Finally, save extra information about the drive geometry necessary in order to interpret the partition table stored within the image. The most important of which is the cylinder size.
fdisk -l /dev/sda > /path/to/list_fdisk.info
gunzip -c /path/to/backup.img.gz | dd of=/dev/sda
First and most obvious question: When booting up to a restored clone image, would it be the same as if I booted up normally from the time period that the back up was made? As in, all my settings and tweaks would be in place, proper wallpaper on the screen and customization and software present?
First thing the sites tell you as that your backup drive must be equal to or larger than your source drive. That is a tall order on on po'boy like myself... Surely the backup drive needs to only be larger than than what I am using on my system, right? So if I am using a 16gig flash drive (which is much bigger than the space I am occupying on my hard drive), that should be sufficient, right?
Above it says from arch, "use tune2fs /dev/sdXY -U random". I am a mechanic. If you happen to be unfamiliar with mechanical and I say, "use a torque wrench to check your torque specs" you may just say, "yeah, sure, sure... thanks... What is a torque wrench, what are the specs and how do I do that?" I do not understand "use tune2fs."
I appreciate any help or insight offered. Hopefully, an efficient and useful 'restore' process can be created.