Am I overthinking this backup?

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
cecilieaux
Level 5
Level 5
Posts: 742
Joined: Mon Dec 09, 2013 9:43 am
Location: Washington, D.C.

Am I overthinking this backup?

Post by cecilieaux »

(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?
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.
Cecilieaux
--
Every time I think I'm past newbiedom something like this happens.
Running Linux Mint 21 Vera with Cinnamon.
User avatar
Termy
Level 12
Level 12
Posts: 4248
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: Am I overthinking this backup?

Post by Termy »

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: 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.
gittiest personITW
Level 12
Level 12
Posts: 4286
Joined: Tue May 28, 2019 4:27 pm

Re: Am I overthinking this backup?

Post by gittiest personITW »

+1

Also this command might give less software that was pre-installed:

Code: Select all

ls -l /usr/share/applications	
User avatar
AndyMH
Level 21
Level 21
Posts: 13759
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Am I overthinking this backup?

Post by AndyMH »

cecilieaux wrote: Fri Oct 07, 2022 10:32 am but I'm not convinced they got everything, or in the right order.
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.

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
User avatar
all41
Level 19
Level 19
Posts: 9527
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Am I overthinking this backup?

Post by all41 »

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
Everything in life was difficult before it became easy.
User avatar
Termy
Level 12
Level 12
Posts: 4248
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: Am I overthinking this backup?

Post by Termy »

gittiest personITW wrote: Fri Oct 07, 2022 12:17 pm [...]
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.
all41 wrote: Fri Oct 07, 2022 2:55 pm It's like a car with a knock in the engine--don't take it on a long trip
Well said!
AndyMH wrote: Fri Oct 07, 2022 12:24 pm If you can take an image backup of the drive using foxclone.
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. :roll: 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.
User avatar
AndyMH
Level 21
Level 21
Posts: 13759
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Am I overthinking this backup?

Post by AndyMH »

Termy wrote: Sat Oct 08, 2022 6:10 am This is a terrible and potentially fatal (for the data/drive) idea, unfortunately.
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
User avatar
Termy
Level 12
Level 12
Posts: 4248
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: Am I overthinking this backup?

Post by Termy »

AndyMH wrote: Sat Oct 08, 2022 6:41 am I think you are confusing backup and clone, two different things. I did not suggest cloning.
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.
gittiest personITW
Level 12
Level 12
Posts: 4286
Joined: Tue May 28, 2019 4:27 pm

Re: Am I overthinking this backup?

Post by gittiest personITW »

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?
User avatar
AndyMH
Level 21
Level 21
Posts: 13759
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Am I overthinking this backup?

Post by AndyMH »

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.
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.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
User avatar
RollyShed
Level 8
Level 8
Posts: 2441
Joined: Sat Jan 12, 2019 8:58 pm
Location: South Island, New Zealand
Contact:

Re: Am I overthinking this backup?

Post by RollyShed »

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.
User avatar
all41
Level 19
Level 19
Posts: 9527
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Am I overthinking this backup?

Post by all41 »

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.
+1 on this strategy.
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.
gittiest personITW
Level 12
Level 12
Posts: 4286
Joined: Tue May 28, 2019 4:27 pm

Re: Am I overthinking this backup?

Post by gittiest personITW »

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.
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?
User avatar
all41
Level 19
Level 19
Posts: 9527
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Am I overthinking this backup?

Post by all41 »

Mostly if the file path is intact the file can be copied.(but not always)
Everything in life was difficult before it became easy.
Locked

Return to “Other topics”