Restoring an inaccessible OS with timeshift?

As seems to always be the case, I’m not sure where I messed up, but I messed up. I thought I was being prudent creating Timeshift snapshots before tinkering with the system, yet now I find that Timeshift isn’t designed to work with inaccessible systems, at least not without a dedicated external backup. I thought that I would be able to use Timeshift on a live USB, or the Ubuntu system on a neighboring partition, but it seems that may not be possible.

Please.

If there’s any way to get at those snapshots and rebuild the system, tell me. The Ubuntu system actually can see the snapshots, it seems that they’re just useless outside the system that made them.

On boot, the system goes through all the "OK"s until it gets to the one about ‘found graphic interface’ or the one about bluetooth right after that, at which point it just becomes unresponsive.

So, if I understand correctly, EndeavorOS and Ubuntu are installed on the same disk, just on different partitions. And you took the snapshots on an external USB drive under Ubuntu, and you want to restore on EndeavorOS, not under Ubuntu? Because I don’t think it’s possible that way. Snapshots can always be restored on the operating system on which they were created. Maybe I misunderstood something?

Get a live ISO (perhaps on USB), arch-chroot into the system and restore Timeshift created backups from there to the correct original places.

No, the snapshots are on the endeavouros partition, in the default /timeshift/snapshots partition.

Arch-chroot worked, and I now have access to timeshift via the CLI. But timeshift can’t find the snapshots, even though they’re clearly right there. I’ve read the manual and tried all the techniques I can think of, but I’ve never done this before, so I’m probably missing something.

Normally, even from a live session where you have Timeshift, you should be able to see all the other partitions on all the disks. You then choose where your partition with the snapshots are and then restore.

Screenshot from 2023-04-30 16-15-57

Running lsblk shows the devices correctly. I can also navigate to the snapshots folder in the graphical file explorer or the terminal. But running timeshift --list-devices yields an empty list, and timeshift --list --snapshot-device /dev/nvme0n1p3 yields a readout saying there is no UUID, no Path, and no snapshots.

Running timeshift --snapshot-device /dev/nvme0n1p3 actually does cause something to happen, responding that “App config loaded: /etc/timeshift/timeshift.json”, but this doesn’t seem to change anything else.

Could you post lsblk -f ?

Wow, you’re responsive! I may have spoken too soon. It seems that lsblk -f works correctly in the normal live environment:

–but not under chroot:

image

So from inside chroot, what does:

timeshift --list

say?

Also please post terminal output as text. Copy, paste, highlight and press Ctrl-E to format.

It makes it easier to read, to copy and quote and also it will be available to forums’ search function.

Result

[root@EndeavourOS snapshots]# timeshift --list
Device : Not Selected


** (process:770): CRITICAL **: 11:00:59.998: gee_abstract_collection_get_size: assertion 'self != NULL' failed
No snapshots found
[root@EndeavourOS snapshots]# timeshift --list-devices

Devices with Linux file systems:

Num    Device  Size  Type  Label  
------------------------------------------------------------------------------

(ah!, so that’s how to make it look clean)

Exit the chroot.

You don’t need to chroot to restore a snapshot.

2 Likes

The thing is that the live endeavouros live environment doesn’t come with timeshift, and I’m unable to install it. Trying to get it via yay yields a bunch of errors.

You said you have an Ubuntu system.

Use Timeshift from there. Launch the GUI >> Settings >> Location: Choose the partition with your snapshots >> OK.

Now back to the first screen choose the snapshot you want to restore.

What errors? This seems fixable.

warning: no /var/cache/pacman/pkg/ cache exists, creating...
:: Retrieving packages...
 poppler-data-0.4.12-1-any               2014.5 KiB  1278 KiB/s 00:02 [--------------------------------------] 100%
 python-pygments-2.14.0-2-any               2.1 MiB  1303 KiB/s 00:02 [--------------------------------------] 100%
 vala-0.56.3-1-x86_64.pkg.tar.zst failed to download
 graphviz-7.1.0-1-x86_64.pkg.tar.zst failed to download
 ghostscript-10.0.0-4-x86_64.pkg.tar.zst failed to download
 gsfonts-20200910-2-any.pkg.tar.zst failed to download
 glib2-docs-2.74.5-1-x86_64.pkg.tar.zst failed to download
 Total ( 7/25)                             34.3 MiB  1993 KiB/s 00:18 [--------------------------------------] 100%
error: failed retrieving file 'ghostscript-10.0.0-4-x86_64.pkg.tar.zst' from mirror.f4st.host : The requested URL returned error: 404

…(about a hundred more “failed retrieving file” errors)…

error: failed to commit transaction (failed to retrieve some files)
Errors occurred, no packages were upgraded.
error: target not found: libgee
error: target not found: xorg-xhost
error: target not found: docbook-xml
error: target not found: docbook-xsl
error: target not found: glib2-docs
error: target not found: python-lxml
error: target not found: python-pygments
error: target not found: python-six
error: target not found: python-anytree
error: target not found: gtk-doc
error: target not found: libxaw
error: target not found: jbig2dec
error: target not found: libpaper
error: target not found: ijs
error: target not found: libidn
error: target not found: poppler-data
error: target not found: ghostscript
error: target not found: netpbm
error: target not found: gts
error: target not found: gsfonts
error: target not found: graphviz
error: target not found: vala
error: target not found: gcab
error: target not found: appstream-glib
 -> error installing repo packages

As an aside, while I’m in the endeavouros live environment, the number and punctuation keys on my laptop keyboard are scrambled. I/m tried a few alternate keyboard types from the menu, but the problem remains the same. Suggestions?

From the live environment you can try this:

yay -Sy timeshift-bin

This was the first thing I tried. I couldn’t get the GUI to work, but now I’m trying the CLI and it IS working. But I’m seeing an option I don’t understand, and I don’t want to make a mistake:

Select '/efi' device (default = /dev/nvme0n1p1):

Num     Device              Size  Type  Label        
------------------------------------------------------------------------------
0    >  /dev/nvme0n1p2  411.3 GB  ext4               
1    >  /dev/nvme0n1p3  612.4 GB  ext4  endeavouros  

[ENTER = Default (/dev/nvme0n1p1), r = Root device, a = Abort]

Enter device name or number:

Here’s what raises an alert in my noob-head:

  • Maybe all linux installs need an efi directory.
  • Partition 2 has ubuntu on it, and partition 3 has endeavour on it. I don’t know or understand what is in partition 1. There’s a folder in there called /boot/efi. Maybe this is ubuntu’s efi, and if I put something else there, ubuntu will break.
  • I know that endeavouros has a top-level /efi directory. So maybe the /efi referred to here needs to go in partition 3, and if it doesn’t endeavouros will be broken.

Help me understand?

/dev/nvme0n1p1 appears to be your EFI partition(ESP).

So I guess you would just press Enter there.