Restore backup from cli

This is probably not the right category, but I didn’t find anything suitable.

The UI doesn’t come up after an update, and I ran through all the check & rebuild commands I could find. Finally, I wanted to try a backup (btw, there is a LOT of outdated documentation when you search for backup restore with HA).

So now I know that I have to do ‘backup restoe ’. Unfortunately, I can only list the backups on the CLI and there are many and go by too fast to read.

How do I do paging in the CLI? Or sort them by age? Or list latest 3 or somesuch?
I can’t be the first person with that problem. But I don’t see an obvious solution for this problem.

Help much appreciated. Thanks.

Ok, this link helped (but I still think ‘backup’ should do pagination by itself…)

Hi, I would like to propose an addition to the documentation. I corrupted my existing installation. I could still access CLI (display and keyboard connected to raspberry PI). I had to find the correct backup (fka snapshot) to restore. using ‘HA BACKUP LIST’ scrolled too fast and I never saw the slug of the latest backup. The following steps worked:

  1. in the CLI type login
  2. cd /mnt/data/supervisor/backup
  3. ls -l → find the required backup and note the slug
  4. go back to CLI with exit
  5. back restore <slug>

Worked great with the full backup I had available.
Maybe this can help others as well.
Thanks and all the best, Robert

Next problem: “… is only a partial backup”. I tried two of the bigger and recentlyish files. Both the same fault. How do I know which is a full backup?

This is weird, but I tried to make a video of the ‘backups’ command…

As far as I can see, there are only partial backups (scrolling is faster than video).

What do I do now? What can I do with partial backups?

ls -lath | more

That will pause each page.It will also sort them in time order.

Yes, but only after you login. Then ‘backups’ is not available and ‘ls’ gives you no information about the type of backup.

Have you tried ha backups | more

1 Like

D’oh - ok that was a bit stupid of me. HA runs here in a VM and when I connect to it, I start on the HA CLI.
The CLI has ‘backups’ but not ‘more’.
When I ‘login’ it is just the other way round.

But: I can run ‘ha backups | more’ after the login which then works as expected.
I did not think about that.

Btw., my problem was totally unrelated to HA which was running perfectly. Didn’t need the backups…

1 Like