I wrote a script for backing up files and nvram customizations. Perhaps you can modify and run it for yours.
Change myusbdrive to yours.
Change the backup directory to yours.
Change the list of files.
Change the list of nvram variables.
Make the script executable "chmod 755 mybackup.sh"
Run it "./mybackup.sh"
Code:
# cat mybackup.sh
#!/bin/sh
#
umask 022
myusbdrive="/tmp/mnt/SamsungT5"
mybackupdir=${myusbdrive}/backup
#
for myfile in ${myusbdrive}/entware/etc/stubby/stubby.yml ${myusbdrive}/entware/share/diversion/list/blacklist ${myusbdrive}/entware/share/diversion/list/wc_blacklist ${myusbdrive}/entware/share/diversion/list/whitelist /jffs/scripts/dnsmasq.postconf
do
echo "==============================================================================================="
ls -la ${myfile}
cp ${myfile} ${mybackupdir}
echo "#"
echo "Copied ${myfile} to ${mybackupdir}"
done
#
for mynvram in custom_clientlist dhcp_staticlist sshd_authkeys
do
echo "==============================================================================================="
nvram get ${mynvram}
nvram get ${mynvram} > ${mybackupdir}/${mynvram}
echo "#"
echo "Backed up nvram variable ${mynvram} to ${mybackupdir}/${mynvram}"
done
echo "==============================================================================================="
#
If all goes well, then I can copy the backups to the Samba share directory where I can copy to my Windows laptop.
The syntax to restore an nvram variable is, from the directory of the backup:
Code:
nvram set variable="`cat variablefile`"
nvram commit