Gear Mesh 3 Posted October 11, 2023 Share Posted October 11, 2023 When I back up my configs before an update, one of the commands I run is this:create system backup nsconfig_full_backup_2022-12-25 -level full -comment "Backup before Firmware Upgrade-2022-12-25"But I'd rather not enter today's date, I'd rather have the system get it programmatically.Is there a way to get the date and put it in a variable to replace the hard coded date?I tried this code but it ERRORED out:create system backup nsconfig_full_backup_$(date +%Y-%m-%d) -level full -comment "Backup before Firmware Upgrade-$(date +%Y-%m-%d)"I am currently running 13.0 code if it matters. Link to comment Share on other sites More sharing options...
BHARATNAG GEMBALI Posted October 19, 2023 Share Posted October 19, 2023 There is no way to read the variable in any of the builds. But if the name of the backup is not specified, it will automatically create the backup file with the current timestamp.create system backup -level full -comment "Backup before Firmware Upgrade-2022-12-25...""show system backup" will display the name of the file, creation time. Link to comment Share on other sites More sharing options...
Kai Thorsrud Posted October 20, 2023 Share Posted October 20, 2023 if you echo the line you have attempted then pipe that line to a shell or a way of executing i belive it will work Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now