r/archlinux • • 24d ago

QUESTION Backups and restores

How does everyone usually do their backups, restores and migrating to a new device?

So basically right I've been using timeshift to create the backups and then I include /home and exclude the steam library. Then when migrating to a new machine ive figured out a really easy method instead of installing arch for the 5th time this year, is just plug in a USB with a linux OS on it and restore from timeshift onto the new computer after sorting out the partitions while being booted into the linux USB.

I was just wondering if there is already an easier way for migrating to different machines without doing a full disk clone since it takes up too much space on my remote storage as a backup.

Thanks

Edit: Cheers guys a bit of food for thought, I ended up deciding to make an auto install script which also installs timeshift and back in time so then it requires minimal effort in the future lol.

9 Upvotes

15 comments sorted by

3

u/nikongod 24d ago

If your new device requires drivers you may not have install them. 

Open your old device and remove the ssd. 

Open the new device, and put your old SSD in it. 

Nothing could be simpler. 

-1

u/Forsaken-Cookie-3096 24d ago

and then just move everything from the old ssd to the new ssd. but then say if i keep a load of backups shouldnt i still be testing them on a vm or something.

2

u/xpusostomos 22d ago

99% of my shit is either in Google drive or cloud git. And the other 1% I can afford to lose. Backup and restore is mere convenience, not needed.

1

u/Forsaken-Cookie-3096 22d ago

yeah its mostly the same for me i store most things externally eg (films, images, documents etc) but im now looking about how to automate my system/get near to automation rather then spending 6 hours reinstalling applications, os, gui, customizing and configuring. (im a really lazy guy hahhaha) i mean really installing arch would take me like 20-30mins its just im too lazy to do that and install everything else.

1

u/xpusostomos 22d ago

Storing my home directory in git saved me a ton of time on reinstall but it's not perfect, I don't think there's a one solution for everything. A couple of things I do I have systemd jobs that dump my package lists to a file named by the machine every night, which are also in git. So I know what I used to have on each machine. I also dump every night a list of git repository I have checked out to a file named by machine. I vibe coded a UI so I can quickly checkout something I have checked out on another machine from that history list.

7

u/onefish2 24d ago

Clonezilla to an external SSD.

2

u/Exotic-Screen-9204 23d ago

Rescuezilla might be easier, more pleasant to use.

5

u/onlymys3lf 24d ago

rsync is your friend if you are using a new ssd in the new machine.
Create the partitions on the new ssd (they do not have to be of the same size as the old one), rsync /source/ to /dest.
Adjust your fstab in the new ssd and exec mkinitcpio (consider also grub-mkcofig & grub-install if using it)
You will be good to go.

There are a handful of examples in the wiki.

3

u/House-Wins 23d ago

I second this, I did it last year with rsync and it worked well. Just had to update the UUIDs, and I think partition sizes.

4

u/[deleted] 24d ago

If you’re migrating to other machines often enough that this is an issue you might want to check out a distro like nixos which is declarative and reproducible by nature. Personally I just use btrfs snapshots and a corn job that backs up my data folders, also all my data is technically on a separate drive from my OS so messing with the OS drive doesn’t affect the data and vice versa. My cron job runs a script that does a btrfs backup of the system drive and then copies my data folders (documents, pictures, scripts, videos, etc) to my local server.

1

u/Ggregoro 23d ago

I got a new laptop and wanted to make sure the drivers on it got installed correctly so I put a fresh Arch install on it. Before moving to the new machine, I had my agent create an install.sh on a flash drive with a complete back up of everything, including the DE (which was Cosmic). It reinstalled software and made a complete clone on to the new laptop in about 45 minutes or so.

1

u/archover 23d ago edited 22d ago

First, I install to new hardware. Takes <5min with my custom script, but even without that, an experienced user should be able to install in 20min.

Then, I restore my /home dir to new instances, using tar/cp. Home is what I really care about. I save the tgz file to an external drive.

These are ordinary and key skills.

Good day.

1

u/virtualadept 23d ago

The last time I migrated to a new machine, I used rsync to copy the contents of my home directory on the old SSD to the new one. I used a USB3 adapter so it was a direct connect. Two hours later and everything was restored.

1

u/Cute-Excitement-2589 23d ago

Run all my docs on a cloud. Only temp on main drive. Backup my plugins via codex and create an app install script fpr all my apps to install on boot. And backup my wm dots on the cloud too.

1

u/dbear496 23d ago

I run regular backups with Duplicity, and I only save /home and /etc.

For migrating to a new device, I would probably unplug the main drive from the old device, plug it into the new device, and copy. If that wasn't possible, then I'd probably rsync over ssh.