Page 1 of 1

DEMO: System Transfer using Timeshift

Posted: Wed Dec 04, 2019 9:21 pm
by pbear
There have been several inquiries on the Forum about this strategy. I first read about it on the Manjaro forum. Saw conflicting reports on how well it worked, so decided to do my own tests. I’ve done this twice and it worked well both times. Didn’t really follow the Manjaro tutorial, though, so thought it would be helpful to document my steps.

Caveats: I did my tests with Mate 19.2 in VirtualBox. Was a simple system, root partition only with no encryption. I don’t know whether this method can be tweaked to accommodate multi-partition and/or encryption, but seems to me at that point it probably would be easier and more reliable to use the rsync method.


Preparation. Update system wanting to transfer. If desired, clean up a bit before transferring. Update data file backups if transfering those separately.

Timeshift snapshot. Attach a USB drive with a partition large enough to hold Timeshift snapshot. I used a 64 GB flash drive, though 32 GB would have been enough. Be aware, the partition must be formatted ext4. Open Timeshift.

o Go to settings. For Type, select rsync. For Location, select the USB drive. For Schedule, untick all scheduled snapshots. For Users, have three choices:
Exclude All. Only system files are included in the snapshot, nothing in /home. This is the default. It’s the cleanest and safest choice and the only one suitable (imho) for multi-partition systems. Obviously you have to transfer /home by some other method, but easily done.

Include Hidden. Adds hidden files and folders (e.g., configuration files) to the snapshot. Also picks up Wine apps and Thunderbird archive. Select this option if those folders aren’t included in your data file backups. Mint’s backup tool includes all of /home, so Exclude All is fine in that case.

Include All. Just that, includes everything in /home. Mainly useful if you don’t have data file backups (fix that in the new system, okay?). Even then, only an efficient way to make the transfer if modest in size. Otherwise, it generally makes more sense to transfer those directly if possible, using rsync and a SATA-to-USB cable. In that case, use Exclude All after all.
- Especially if using one of the latter two Users options, make sure the target USB drive is large enough (might need a hard drive rather than flash). If not sure, query in File Manager to see how much space what you're planning to include in the snapshot occupies.

- Leave Filters unchanged. Close settings.

o From main Timeshift screen, click Create, which will generate a manual (on-demand) snapshot. Depending on the size of the system and the speed of the USB port, this can take an hour to complete (more if copying hundreds of GB in data files). Once the snapshot has been saved, restore Timeshift to its prior settings. Close Timeshift.

o Shut down computer and remove USB drive. If want to keep the system running for some reason, be aware you’ll need to enter your admin password to unmount the USB drive, as that’s how Timeshift mounted it.

Install new system. If replacing a hard drive, do that now. Boot a live session. Don’t set up an internet connection. Do turn off Power Management (so screen doesn’t go blank after 30 minutes). If desired, set up partitions but as mentioned I’ve not tested that. Do a minimal install - no third party apps, no updates - as we’re going to rely on the Timeshift snapshot to supply those. When install completes, shut down live session.

“Restore” Timeshift snapshot. Boot live session again. (Tried booting the newly installed system and restoring there; failed twice.) Attach Timeshift drive and open the app. Click Settings; select Timeshift drive as Location; select same Users setting as used when taking the snapshot; close Settings. Select the snapshot, then click Restore. Select root partition when prompted, then accept all defaults. This process will take roughly as long as it took to create the snapshot. Shutdown.

From a file restore point-of-view, one would expect fstab in the restored system to be wrong, as the UUID references should point to the old hardware. That’s what happens with the rsync method and it has to be corrected manually. This isn’t necessary with Timeshift, thoiugh, as it checks the UUIDs and modifies fstab if needed.

Cleanup. On first boot after the restore, you’ll likely see Ubuntu listed as the first option rather than Mint. Select it anyway. Once booted, open Terminal and run sudo update-grub. Reboot. Grub should be correct now.

Re: DEMO: System Transfer using Timeshift

Posted: Thu Dec 05, 2019 1:53 am
by ugly
I actually had to do this a couple months ago.

I had a hardware failure that destroyed my CPU, but my drives were okay. My Mint install is on an NVMe drive and the spare computer I had doesn't have an NVMe connector, so I had no way of accessing the data. Fortunately, my Timeshift backups (and a separate home folder backup) are on a separate hard drive. I was able to do a minimal install of Mint on the backup computer (which has completely different hardware) and then restore my Timeshift backup. It saved me a lot of time.

I would also recommend a dconf backup, because that also let me quickly get my Cinnamon config up and running immediately.

It was an incredibly frustrating situation, but the Timeshift backup really helped me get back up and running relatively smoothly. Instead of spending hours re-installing software, I was up and running in less than half an hour.

Re: DEMO: System Transfer using Timeshift

Posted: Thu Dec 05, 2019 3:33 am
by pbear
Glad to hear this has worked in the real world. As mentioned, I've only done it as a test in VirtualBox.