I moved this thread's topic from this post as it was off-topic on that particular thread.
UPDATE [2024-Apr-10]:
The script was moved to GitHub.
The latest "0.7.12" version update is now available.
===========================================================
At the beginning of 2021, I wrote a small shell script for a relative of mine so he could more easily & quickly back up & restore a specific subset of NVRAM variables related to his OpenVPN Server configuration (separately from his backing up the contents of the "/jffs/openvpn" folder). This was done at a time when he was having some issues with the router & needed to reset to factory defaults frequently while troubleshooting the problem.
Later on, I made more changes to add NVRAM variables for his OpenVPN client configurations. Eventually, I rewrote the script to be able to back up & restore any subset of NVRAM vars using an input file that lists the specific NVRAM variable key names targeted for backup. I recently updated the script to add a user-friendly menu (based on the code I wrote for YazDHCP).
If you're interested in trying this script, you can download it from the GitHub repository.
Here are the instructions:
1) Open an SSH terminal window & type the following commands:
NOTE: You can choose to save the script file in any other location that you prefer.
2) To run the shell script and get some brief help messages, simply go to the directory where it was saved and type:
3) I recommend running the script first in "Menu Mode" to set your preferences for the backup directory path & the input file path.
4) Attached is an example of the required input file (NVRAM_VarList_SAMPLE.txt)
The input file must be saved in the same directory where the shell script is located.
Rename the file to "NVRAM_VarList.txt" & modify it as necessary for your own purposes.
===========================================================
EDIT:
Just a couple of notes:
- This script is not meant as a substitute for the built-in WebGUI option to do a full save & restore of all NVRAM variable settings. It's meant for those users who would like to back up a specific subset of NVRAM variables so that they can more quickly & easily be restored after doing a factory defaults reset of the router.
- It's up to each user to choose & decide which subsets of NVRAM variables are important enough to back up & restore.
HTH.
UPDATE [2024-Apr-10]:
The script was moved to GitHub.
The latest "0.7.12" version update is now available.
===========================================================
I see, there's however no such option on the client side. There seems to be no way to transfer VPN config/settings, not just certificates.
It is not enough to just copy the "/jffs/openvpn" folder.
At the beginning of 2021, I wrote a small shell script for a relative of mine so he could more easily & quickly back up & restore a specific subset of NVRAM variables related to his OpenVPN Server configuration (separately from his backing up the contents of the "/jffs/openvpn" folder). This was done at a time when he was having some issues with the router & needed to reset to factory defaults frequently while troubleshooting the problem.
Later on, I made more changes to add NVRAM variables for his OpenVPN client configurations. Eventually, I rewrote the script to be able to back up & restore any subset of NVRAM vars using an input file that lists the specific NVRAM variable key names targeted for backup. I recently updated the script to add a user-friendly menu (based on the code I wrote for YazDHCP).
If you're interested in trying this script, you can download it from the GitHub repository.
Here are the instructions:
1) Open an SSH terminal window & type the following commands:
Bash:
mkdir -m 755 -p /jffs/scripts
curl -kLSs --retry 3 --retry-delay 5 --retry-connrefused \
https://raw.githubusercontent.com/Martinski4GitHub/CustomMiscUtils/master/NVRAM/SaveRestoreNVRAMvars.sh \
-o /jffs/scripts/SaveRestoreNVRAMvars.sh
chmod 755 /jffs/scripts/SaveRestoreNVRAMvars.sh
2) To run the shell script and get some brief help messages, simply go to the directory where it was saved and type:
Bash:
./SaveRestoreNVRAMvars.sh
3) I recommend running the script first in "Menu Mode" to set your preferences for the backup directory path & the input file path.
Bash:
./SaveRestoreNVRAMvars.sh -menu
4) Attached is an example of the required input file (NVRAM_VarList_SAMPLE.txt)
The input file must be saved in the same directory where the shell script is located.
Rename the file to "NVRAM_VarList.txt" & modify it as necessary for your own purposes.
===========================================================
EDIT:
Just a couple of notes:
- This script is not meant as a substitute for the built-in WebGUI option to do a full save & restore of all NVRAM variable settings. It's meant for those users who would like to back up a specific subset of NVRAM variables so that they can more quickly & easily be restored after doing a factory defaults reset of the router.
- It's up to each user to choose & decide which subsets of NVRAM variables are important enough to back up & restore.
HTH.
Attachments
Last edited: