I'm not home but I gave this answer to another user that got it working with backups of ssh a.o. :
https://www.myopenrouter.com/comment/41594#comment-41594
https://www.snbforums.com/threads/custom-firmware-build-for-r7800-v-1-0-2-60sf.48805/#post-430540
An example of scripts making a backup and restore, using a USB memory at sda1.
Create the files router_backup.sh and router_restore.sh on the USB memory,
with contents like these:
Code:
#!/bin/sh
#----------------------------------------------------------------------
# router_backup.sh
#----------------------------------------------------------------------
BACKUPFILE=/mnt/sda1/R7800backup.tar.gz
BUP="\
/etc/profile
/etc/rc.local
/etc/dropbear
/etc/init.d/stubby
/etc/dnscrypt.conf
/etc/dnscrypt-proxy-2.toml
/etc/openvpn/config/client
/etc/dnsmasq.conf
/etc/*hosts
/etc/netwall*.conf
/opt/scripts/firewall-*start.sh
/root/.ssh/authorized_keys
"
cd /
X=$(echo "$BUP" | xargs)
tar -czhf ./${BACKUPFILE} ${X}
sync
Code:
#!/bin/sh
#----------------------------------------------------------------------
# router_restore.sh
#----------------------------------------------------------------------
BACKUPFILE=/mnt/sda1/R7800backup.tar.gz
BUP="\
etc/profile
etc/rc.local
etc/dropbear
etc/init.d/stubby
etc/dnscrypt.conf
etc/dnscrypt-proxy-2.toml
etc/openvpn/config/client
etc/dnsmasq.conf
etc/netwall*.conf
opt/scripts/firewall-*start.sh
etc/hosts
root/.ssh/authorized_keys
"
cd /
tar --overwrite --warning=no-timestamp -xf ${BACKUPFILE} $BUP -C /
Then to make a backup, run:
Code:
/mnt/sda1/router_backup.sh
Then to restore a backup, run:
Code:
/mnt/sda1/router_restore.sh
#A reboot is needed after the restore is done