Tomato:Backup Settings, Logs, & More to USB Drive Script

This is a script that will back up all of your routers settings, logs, NVRAM data, bandwidth, web usage, sysinfo and more. It is very useful if you often make changes to your router and want the reassurance that your settings are being backed up. Their is nothing worse than doing a 30/30/30 reset and then thinking "…did I write down my settings…". Use this script if you would like to have your router back itself up to a usb storage device on a regular basis by using the scheduler. Also, this script makes use of router lights to let you know when the script is running and if it was successful. Lets get started!

Here are the links to the latest versions.
 * Download for Tomato Full Backup Script
 * Readme for Tomato Full Backup Script

The Script - [The script show might not be the most up to date version, please use download link above] 

Short Description
Backup your router and its contents on a schedule or at anytime.

This is a script that will back up all of your routers settings, logs, NVRAM data, bandwidth, web usage, sysinfo and more. It is very useful if you often make changes to your router and want the reassurance that your settings are being backed up. Their is nothing worse than doing a 30/30/30 reset and then thinking "...did I write down my settings...". Use this script if you would like to have your router back itself up to a usb storage device on a regular basis by using the scheduler. Also, this script makes use of router lights to let you know when the script is running and if it was successful.

Lets get started!

Setup

 * 1. Download the Tomato Full Backup Script
 * 2. Copy the Tomato Full Backup Script that you downloaded to your USB Hard-drive or Flash-drive.
 * 3. Log into your router with the web interface. Usually http://192.168.1.1
 * 4. Then go to "USB and NAS -> USB Support" and in the "Run after mounting" box put the following if statement.


 * 5. Click "[SAVE]"
 * 6. Unmount you usb drive by clicking [ Unmount ], then remount that same drive by clicking [ Unmount ].
 * Note: You can also unplug the drive and plug it back in
 * 7. Then go to “Administration -> Scheduler” and add the "Run Backup" command as seen bellow, place it the "Command" field of Custom 1,2, or 3 just use one that's available.


 * 8. Click "[SAVE]"
 * 9. Goto "Tools -> System". The tile of the page should say "Execute System Commands"
 * 10. Copy and past:


 * 11. Click "[Execute] to test if the script is working"
 * 12. You should now have your first set of backups. Congrats, your done..

You can not test your script with the command:
 * Or:    sh "/tmp/mnt/USB_DRIVE/Tomato/My Scripts of Blue"

General Usage
In the ternal of the router.

Also, the output of the script is now sent to the syslog, so you can now view everything in "Status -> Logs" from the web interface.

To restore Config File you can use the following, or use the web interface.

Known Bugs
If you find any bugs please email AustinSaintAubin@gmail.com.

Tomato Backup Script 2011/02/23 - v7.8
If you get this error: then change "admin" to "root" in "wget.