Upgrade, squashfs, backup and restore

Hi,

I'm trying to figure the best way to maintain my r4s router over upgrade / reinstall.

I'm using a squashfs SD Card.

I'm wondering if the /overlay/upper could be used as a base for backup (ie. on a USB/NAS drive).

Can I consider that only /overlay/upper/etc is important ?

Listing installed package

Consider adding "production" package to image

My idea for reinstall/minor upgrade:

  • backup a selected set of files from /overlay/upper/etc
  • list custom installed packages
  • burn a new SD Card from an image
  • reinstall packages (or add them to image)
  • copy the backup on /overlay/upper/etc

What do you think ?

Or should I use sysupgrade (but can it handle upgrade ?)

is this page uptodate (some scripts are very old)

Here are the config files in my current /overlay/upper/etc
(I should not have updated my packages)

/overlay/upper/etc/board.json
/overlay/upper/etc/config/network
/overlay/upper/etc/config/system
/overlay/upper/etc/config/dhcp
/overlay/upper/etc/config/dropbear
/overlay/upper/etc/config/firewall
/overlay/upper/etc/config/luci
/overlay/upper/etc/config/rpcd
/overlay/upper/etc/config/ucitrack
/overlay/upper/etc/config/uhttpd
/overlay/upper/etc/config/collectd
/overlay/upper/etc/config/luci-opkg
/overlay/upper/etc/config/luci_statistics
/overlay/upper/etc/config/irqbalance
/overlay/upper/etc/config/irqbalance-opkg
/overlay/upper/etc/uhttpd.crt
/overlay/upper/etc/uhttpd.key
/overlay/upper/etc/dropbear/dropbear_ed25519_host_key
/overlay/upper/etc/dropbear/dropbear_rsa_host_key
/overlay/upper/etc/dropbear/authorized_keys
/overlay/upper/etc/shadow
/overlay/upper/etc/passwd
/overlay/upper/etc/urandom.seed
/overlay/upper/etc/shadow-
/overlay/upper/etc/passwd-
/overlay/upper/etc/init.d/ucitrack
/overlay/upper/etc/init.d/urngd
/overlay/upper/etc/init.d/collectd
/overlay/upper/etc/init.d/luci_statistics
/overlay/upper/etc/init.d/irqbalance
/overlay/upper/etc/luci-uploads/.placeholder
/overlay/upper/etc/hotplug.d/net/40-net-smp-affinity

Are there some files to exclude in some case ?

Crypto can be regenerate sometime

/overlay/upper/etc/uhttpd.crt
/overlay/upper/etc/uhttpd.key
/overlay/upper/etc/dropbear/dropbear_ed25519_host_key
/overlay/upper/etc/dropbear/dropbear_rsa_host_key

empty files

/overlay/upper/etc/luci-uploads/.placeholder

What are you trying to accomplish that auc and LuCI Attended Sysupgrade don't already do? Moving across releases, where packages are renamed, added or deleted, or something else?

For backups I use sysupgrade -l to see what's in my backups (augmented with my custom stuff in /etc/sysupgrade.conf), then use sysupgrade -b backup.tgz to do the actual backup (scping it off to my NAS).

1 Like

I'm trying to decypher the doc that is not always uptodate (but well maintained).

But OK I'm start with sysupgrade !

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