Am I overthinking this backup?
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
-
- Level 5
- Posts: 742
- Joined: Mon Dec 09, 2013 9:43 am
- Location: Washington, D.C.
Am I overthinking this backup?
(OK, I am a N00B ... also see signature for system)
I'm replacing a 1TB SATA drive with a death rattle. I tried regular backup programs (aptik, timeshift) but I'm not convinced they got everything, or in the right order.
So ... the plan is
A. Manually moving
i. archived *.deb (Linux Mint program install files) that *I* installed, independent of the system;
ii. Dot /.* folders with program configuration/customization files (so I start with a "clean" system)
B. Moving /home (personal data) files using rsync: "sudo rsync -auv /home {destination}")
C. Checked that I have a CD/DVD with the latest system (Linux Mint 21 Vanessa cinnamon) ✓
Presumably will restore onto new 2TB SATA drive in reverse order.
QUESTIONS:
Am I doing this right?
Or am I overthinking it?
Is there a better way?
I'm replacing a 1TB SATA drive with a death rattle. I tried regular backup programs (aptik, timeshift) but I'm not convinced they got everything, or in the right order.
So ... the plan is
A. Manually moving
i. archived *.deb (Linux Mint program install files) that *I* installed, independent of the system;
ii. Dot /.* folders with program configuration/customization files (so I start with a "clean" system)
B. Moving /home (personal data) files using rsync: "sudo rsync -auv /home {destination}")
C. Checked that I have a CD/DVD with the latest system (Linux Mint 21 Vanessa cinnamon) ✓
Presumably will restore onto new 2TB SATA drive in reverse order.
QUESTIONS:
Am I doing this right?
Or am I overthinking it?
Is there a better way?
Last edited by LockBot on Fri Apr 07, 2023 10:00 pm, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Cecilieaux
--
Every time I think I'm past newbiedom something like this happens.
Running Linux Mint 21 Vera with Cinnamon.
--
Every time I think I'm past newbiedom something like this happens.
Running Linux Mint 21 Vera with Cinnamon.
Re: Am I overthinking this backup?
The thing with dying drives is, at least with HDDs, any read or write could be the last thing that drive does, so you need to grab the most important data ASAP. That's how I see it and how I've experienced it. You don't want to spend ages spamming the drive, copying useless crap you don't need, while the stuff you do need is gone because the drive died.
If by archived '*.deb' files you mean those cached by the likes of APT (in '/var/cache/apt', or somewhere similar), then I wouldn't bother wasting precious drive life on those, since you can usually get them from the Internet easily. I think the same goes for other '*.deb' files you've archived elsewhere (IE: in '/home'). If you want that stuff, then leave it for last, would be my suggestion. Or, get a list of the packages you have installed (IE:
If those dot files you referred to are the ones in '/home', then you'd be wasting drive life by copying them twice, because of your rsync(1) command.
BTW, '/.*' doesn't mean what you perhaps think it means. That means anything within the '/' directory itself which begins with a single dot (hidden files).
If by archived '*.deb' files you mean those cached by the likes of APT (in '/var/cache/apt', or somewhere similar), then I wouldn't bother wasting precious drive life on those, since you can usually get them from the Internet easily. I think the same goes for other '*.deb' files you've archived elsewhere (IE: in '/home'). If you want that stuff, then leave it for last, would be my suggestion. Or, get a list of the packages you have installed (IE:
dpkg -l | awk '$1 == "ii" {print($2)}'
) and save that somewhere else for review in the newly-installed system.If those dot files you referred to are the ones in '/home', then you'd be wasting drive life by copying them twice, because of your rsync(1) command.
BTW, '/.*' doesn't mean what you perhaps think it means. That means anything within the '/' directory itself which begins with a single dot (hidden files).
I'm also Terminalforlife on GitHub.
-
- Level 12
- Posts: 4286
- Joined: Tue May 28, 2019 4:27 pm
Re: Am I overthinking this backup?
+1
Also this command might give less software that was pre-installed:
Also this command might give less software that was pre-installed:
Code: Select all
ls -l /usr/share/applications
Re: Am I overthinking this backup?
If you can take an image backup of the drive using foxclone. You can then clone the backup to your new drive when you get it. The new drive needs to be the same size or larger than the dying drive.cecilieaux wrote: ⤴Fri Oct 07, 2022 10:32 am but I'm not convinced they got everything, or in the right order.
Download the iso for foxclone from foxclone.org not foxclone.com (downloads broken).
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Re: Am I overthinking this backup?
I agree with Termy--concentrate on irreplaceable files. Get those off the drive first.
There is a lot of head movement during backup and cloning processes. It's like a car with a knock
in the engine--don't take it on a long trip
There is a lot of head movement during backup and cloning processes. It's like a car with a knock
in the engine--don't take it on a long trip
Everything in life was difficult before it became easy.
Re: Am I overthinking this backup?
That location is intended exclusively for globally-installed programs and those with an associated '*.desktop' file in that location. Those files are also typically only created for GUI programs. The example command I gave would pick up a lot of stuff the user didn't specifically install, but at least it'd be a complete and accurate* list, at least of packages installed with '*.deb' files.
* Because '*.desktop' files can remain despite the software being removed, particularly if someone manually installed something.
Well said!
This is a terrible and potentially fatal (for the data/drive) idea, unfortunately. That being said, I went to do the same thing one day, and regretted it soon after the cloning started. All this has been explained already, but for the OP's sake, I thought I'd point it out. Cloning a drive is something I'd only do for switching drives, backing up a drive, or if I strongly suspect something malicious is stored and I need to dd(1) it to check the image file more thoroughly in a safer way. For damaged or potentially-damaged drives, it's not a safe move at all, unless perhaps you barely have any data on the drive and/or you're not fussed about its contents.
I'm also Terminalforlife on GitHub.
Re: Am I overthinking this backup?
I think you are confusing backup and clone, two different things. I did not suggest cloning.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Re: Am I overthinking this backup?
The act of backing up the drive and cloning will both spam the problem drive very hard, likely copying files not nearly as important as others.
I'm also Terminalforlife on GitHub.
-
- Level 12
- Posts: 4286
- Joined: Tue May 28, 2019 4:27 pm
Re: Am I overthinking this backup?
It would make sense to make a list of directories that you want to copy in order of importance.
Boot into Foxclone and Andy has kindly put lots of nice utilities on there but hopefully you can get away with just mounting the problem drive and do the copying in the file manager.
Copy your directories, then, if all is well, do an image using Foxclone.
ps
Maybe it is worth the op starting a backup routine - cycling backups, possibly, maybe?
Boot into Foxclone and Andy has kindly put lots of nice utilities on there but hopefully you can get away with just mounting the problem drive and do the copying in the file manager.
Copy your directories, then, if all is well, do an image using Foxclone.
ps
Maybe it is worth the op starting a backup routine - cycling backups, possibly, maybe?
Re: Am I overthinking this backup?
Pretty much everything in the iso was chosen to get the smallest iso possible. The file manager is pcmanfm, okay but not the best, personally I'd boot a mint iso and use nemo.gittiest personITW wrote: ⤴Sat Oct 08, 2022 12:44 pm Andy has kindly put lots of nice utilities on there but hopefully you can get away with just mounting the problem drive and do the copying in the file manager.
Copy your directories, then, if all is well, do an image using Foxclone.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
- RollyShed
- Level 8
- Posts: 2441
- Joined: Sat Jan 12, 2019 8:58 pm
- Location: South Island, New Zealand
- Contact:
Re: Am I overthinking this backup?
Personally the way I'd do it, have done it, I'd unplug the old disk and put the new one in.
Do a complete install and set it up the way it is wanted.
Then shut down, plug in the old disk, boot and copy everything across, Everything on/in the Desktop to Desktop, all in Documents to Documents etc. etc.
Do a complete install and set it up the way it is wanted.
Then shut down, plug in the old disk, boot and copy everything across, Everything on/in the Desktop to Desktop, all in Documents to Documents etc. etc.
Re: Am I overthinking this backup?
+1 on this strategy.RollyShed wrote: ⤴Sat Oct 08, 2022 8:15 pm Personally the way I'd do it, have done it, I'd unplug the old disk and put the new one in.
Do a complete install and set it up the way it is wanted.
Then shut down, plug in the old disk, boot and copy everything across, Everything on/in the Desktop to Desktop, all in Documents to Documents etc. etc.
Maybe not everything in those directories--get the files in order of importance.
Once these files are safely copied you will gain confidence in exploring further.
Be aware of the possibility of failure at any moment, however that drive may also limp along for years.
Consider it a question mark in your system--get your files off--then get it out of there.
Everything in life was difficult before it became easy.
-
- Level 12
- Posts: 4286
- Joined: Tue May 28, 2019 4:27 pm
Re: Am I overthinking this backup?
I see where you're coming from by doing that but it could cause a problem with the new installation if the old disk decides to pack up whilst copying half an important file over - maybe a config file. However, you won't know which config file. I suppose it would be possible to hunt it down but why take the chance?Then shut down, plug in the old disk, boot and copy everything across, Everything on/in the Desktop to Desktop, all in Documents to Documents etc. etc.
Re: Am I overthinking this backup?
Mostly if the file path is intact the file can be copied.(but not always)
Everything in life was difficult before it became easy.