[solved] Backup not restored

Hi,
i made a backup with LUCI on my main-router (FritzBox 4040 OpenWrt 19.07.3 r11063-85e04e9f46) and restored this with LUCI to an other 4040 with 19.07.7

The restore runs without error and the system reboots. After reboot there are no changes, the backup is not restored. Only the root password is restored from the backup

I have already done a factory-reset.

Then I made a small change (changed the hostname via LUCI) an made a reboot. The hostname is stored.
After that I tried the restore again. result, the Hostname is default (openwrt) and not the changed one before or the one from the backup.

The backup is a simple .tar.gz file.
You can easily look into its contents in your PC (with winrar, 7zip, whatever) and verify that is has the expected contents (config files etc.)

And you can move it to your router with scp (winscp etc.) and extract the contents there.

2 Likes

The TAR has the expected content.

Anything usefull in the logs?

1 Like

in /var/log the lastlog has 0 byte size

Is it normal, that i can login with no password to ssh, but LUCI ask for my password?

What about logread and dmesg?

2 Likes

If i try to login with sftp root@192.168.1.1 and entering password get:
ash /usr/libexec/sftp-server: not found

I want to download the logs

After upgrade all non-default packages were gone (config was still there) - #3 by vgaetera

1 Like

I downgraded to 19.07.3. After that the restore was successful.

Is it the case, that a backup/restore works only on the same version/subversion?

Edit: I can`t login in LUCI. Password is not accepted. ssh-login to root without password is possible.

Then you should be able to provide the logs, no?

2 Likes

You should look at the logs. Possibly you have too full flash, or something like that, and the flash rootfs (overlay) is not enabled, and all your changes go to RAM overlay that naturally gets wiped at reboot.

logread/grep commands for log...

logread | grep overlay
logread | grep jffs2
logread | grep ubi
1 Like

This is on 19.07.03, where i restored everything, but I can't login to LUCI, also after reseting the password with https://openwrt.org/docs/guide-user/troubleshooting/root_password_reset

root@OPE:~# logread |grep overlay
Wed Aug 25 16:08:59 2021 user.info kernel: [    9.420345] mount_root: switching to jffs2 overlay
Wed Aug 25 16:08:59 2021 kern.warn kernel: [    9.457303] overlayfs: upper fs does not support tmpfile.
root@OPE:~# logread |grep jffs2
Wed Aug 25 16:08:59 2021 kern.info kernel: [    0.041072] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
Wed Aug 25 16:08:59 2021 kern.notice kernel: [    0.689143] 0x000001f00000-0x000002000000 : "jffs2"
Wed Aug 25 16:08:59 2021 kern.notice kernel: [    9.413751] jffs2: notice: (145) jffs2_build_xattr_subsystem: complete building xattr subsystem, 3 of xdatum (0 unchecked, 3 orphan) and 3 of xref (3 dead, 0 orphan) found.
Wed Aug 25 16:08:59 2021 user.info kernel: [    9.420345] mount_root: switching to jffs2 overlay
root@OPE:~# logread |grep ubi
root@OPE:~#

That looks pretty normal.

That is the failing router, right?
have you opkg installed the possible add-on packages that your config might depend on? Do you have any special config, or just the default packages?

Backups generally work for the same or a newer OpenWrt version, assuming that you have installed all needed packages. The backup only stores config, but does not restore the possbile add-on packages that you have installed.

1 Like

My goal is to have a 1:1 clone of my openWRT. What is the easiest way to have a 1:1 snapshot/Image/backup? A small hint is very appreciated.

OpenWrt is not really designed for that, but some alternatives:

  • Build personalised OpenWrt images for your devices, so that all your devices XYZ have the same packages. Then it is easy to copy settings via backup.

  • The file system is usually built around the concept of "flashed firmware as /rom" + "r/w overlay as /overlay" shown together as the root filesystem "/" via the overlayfs. All settings and the add-on packages that you installed, are there in /overlay/upper.
    That enables you to .tar.gz archive everything in /overlay/upper in one device and restore it into /overlay/upper another router, assuming that the devices are identical and have have the same flashed firmware versions. After restoring the archive, you should reboot so that the router can boot with your restored packages.
    (Note that this does not apply to the SD card base systems and similar, which are without overlay)

2 Likes

This was solved by deleting the browser-cache. Strange.

This solved my issue. I only transferred the config-dir, mainly to avoid the password-issue.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.