How to recover the system using the livecd and a timeshift backup in terminal?

I have a livecd of a rather old version. So I can only use timeshift in the terminal. My timeshift snapshot is stored in an external disc. If I use timeshift —list, I can’t find my snapshot. But my disc is mounted properly and I can see the files in the disc in the file explorer. So any guidance about how to use timeshift in this situation?

Hi @xiangsheng,

You have to be in the timeshift snapshots directory, from the live environment. And there:

timeshift --restore

Either that, or, and I can’t remember which now, you have to be chroot ed into yo9ur system and from there, run:

timeshift --restore

Hope this helps!

1 Like

Thank you for your suggestion! But now I have a problem. To use timeshift, I first need to sudo manjaro-chroot -a, since timeshift is installed in my original system not in the livecd. However, once I chroot, I can’t change directory into directory on my external disc. It seems the external disc is mounted on the livecd system. Maybe I need to unmount and mount my external disc. But I don’t know how to do it step by step. Can you give me some help?

In the chroot environment, run the command:

lsblk

…and provide the output please.

sdc is my external disc.

Return the output of:

mount

…as well as:

cat /etc/fstab

…from the chroot environment please.

OK, I do not know if this will work, but I suspect so. Let’s mount sdc:

mount /dev/sdc1 /mnt && cd /mnt

The try again:

timeshift --restore

Should I first unmount sdc from livecd?

I think so, yes. Not :100: on that though…

Ok, now I can mount into the snapshot directory in my external disc. But timeshift still doesn’t work.

Try:

timeshift --list --snapshot-device /dev/sdc1

I’ve tried. Still found no snapshot. In fact, I have 3 directories in the root directory of this external disc. Only the directory named timeshift contains the snapshot files. Is that the reason?

I’m no expert, I’ve only restored once before, but I don’t think so…

Else, try rebooting, opening a terminal, don’t enter a chroot environment, and try running:

timeshift --list --snapshot-device /dev/sdc1

…again.

Thank you. But my old livecd don’t have timeshift. :sweat_smile:

You can install it on the live ISO. Just bear in mind that it will not survive a reboot.

pacman -S timeshift

Fortunately, my system comes back, although not via livecd. In fact, my system is not totally broken, only the X window can’t start. So I try to use console to run timeshift and it works!

I guess that maybe I should not mount the external disc before using timeshift. I try it in livecd again and failed. But this time, timeshift doesn’t tell me that no snapshot exist. Instead, it says that not enough disc space (47.4GB). I have no idea what this means, since my external disc has more spare space than this number.

But that gives a clue. The restore isn’t trying to restore/write to your external drive. That’s where the backup is made to. The restore will try and restore the backup where is came from, so if there’s not enough space, like the drive’s been replaced with a smaller one, or there is much more info on it - so there is less free space, it won’t work.

Yay, that makes sense. The spare space of my internal disc is rather small, only about 35gb or so. So maybe if I run timeshift using the original system, the spare space is barely enough for the copy operation. However, the livecd system occupies extra spaces in the internal disc (I guess), the remain spare space is not enough.

No, AFAIK the live environment is completely RAM-based and doesn’t touch you hardware, unless you change and adapt it specifically for that.