r/archlinux • u/Forsaken-Cookie-3096 • 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.
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.
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.
7
u/onefish2 24d ago
Clonezilla to an external SSD.
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.
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.