Social security for getting on a large amount Beat The Cycle Of Debt Beat The Cycle Of Debt for an approved in addition questions.

Tomato Router Config – Backup Script

Posted: March 18th, 2011 | Author: | Filed under: Linux, Tech | Tags: , , , , , , , , , , | 2 Comments »

I recently was given the task to automate the backups of several remote routers that we manage that run tomato firmware.
Here is the Tomato developer’s site: www.polarcloud.com/tomato
The main goals were:

  • To use https
  • To be automated (Cron)’d later
  • To scale from 1 to 1XXX routers

I tested it on Tomato Firmware 1.28 using my ASUS RT-N16 router, but it should work for any Tomato-firmware router.
There will be some slight modifications to run in cron, but let me know and I’ll be glad to help.
Download the .zip file here: tomatobackup1405

Extract the file so the full path will be /root/tomatobackup1405
Read the README inside the folder
chmod +x tomatobackup1405.sh
Add your hosts to the tomatobackup1405_hosts.cfg file
Run it!

If successful, you will see a subfolder with the date YYYYMMDD and the file with CoName-tomato_v_.cfg
If there are connection problems, you’ll see an error message.

EDIT: There was a python rewrite by Sam@orgraphone.org
Feel free to check it out here

Let me know if you have any thoughts or suggestions.
-Gregg


2 Comments on “Tomato Router Config – Backup Script”

  1. 1 Sam said at 2:55 pm on July 13th, 2011:

    Hi Gregg

    I borrowed the ideas from this very useful script and rewrote it in python: http://org.orgraphone.org/2011/07/backing-up-tomato/

    Thanks for the inspiration!

    Sam

  2. 2 Vinh Nguyen said at 3:39 pm on January 1st, 2012:

    Hi,

    Thanks for this, but I couldn’t get it working. I’m using Tomato 1.27 on an Asus RT-N16.

    When I execute the curl command from the script file manually, I get

    curl: (35) error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number

    Do you know what’s wrong? I enabled both http and https in tomato. I’m also aware of the python version and got this error:

    IOError: [Errno socket error] [Errno 1] _ssl.c:499: error:14077417:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert illegal parameter

    Please let me know if you have any suggestions. Thanks.


Leave a Reply

  • ERROR: si-captcha.php plugin says GD image support not detected in PHP!

    Contact your web host and ask them why GD image support is not enabled for PHP.

    ERROR: si-captcha.php plugin says imagepng function not detected in PHP!

    Contact your web host and ask them why imagepng function is not enabled for PHP.