FeatureReq: Daily/weekly Logs/rrd write down for embedded



  • hi there

    is it possible to add a feature, where we can set an time interval, on wich the data hold in the ramdisk will be writen to the flash drive? cause when the box loses power or something like that, all data for many days can be gone…

    thx



  • It's possible now with a little manual hacking.  Add a script like this:

    #!/bin/sh
    /etc/rc.conf_mount_rw
    # Save the rrd databases to the config path.
    cd / && tar -czf /cf/conf/rrd.tgz -C / var/db/rrd/*.rrd
    /etc/rc.conf_mount_ro
    
    

    somewhere, chmod +x it, and add it to a cron entry in your config (back it up and open in a text editor to see).



  • @cmb:

    It's possible now with a little manual hacking.  Add a script like this:

    #!/bin/sh
    /etc/rc.conf_mount_rw
    # Save the rrd databases to the config path.
    cd / && tar -czf /cf/conf/rrd.tgz -C / var/db/rrd/*.rrd
    /etc/rc.conf_mount_ro
    
    

    somewhere, chmod +x it, and add it to a cron entry in your config (back it up and open in a text editor to see).

    Hi

    thank you for the answer. I will try the crond scheduled job for this. probably is a option to add this as a function to the webgui.



  • @tohil:

    @cmb:

    It's possible now with a little manual hacking.  Add a script like this:

    #!/bin/sh
    /etc/rc.conf_mount_rw
    # Save the rrd databases to the config path.
    cd / && tar -czf /cf/conf/rrd.tgz -C / var/db/rrd/*.rrd
    /etc/rc.conf_mount_ro
    
    

    somewhere, chmod +x it, and add it to a cron entry in your config (back it up and open in a text editor to see).

    Hi

    thank you for the answer. I will try the crond scheduled job for this. probably is a option to add this as a function to the webgui.

    hi
    ive added the line to /etc/crontab and tried it with crontab -e. but after the reboot the lines are gone. also if i mount the fs first as rw. any ideas?



  • @tohil:

    hi
    ive added the line to /etc/crontab and tried it with crontab -e. but after the reboot the lines are gone. also if i mount the fs first as rw. any ideas?

    Don't edit system files manually. Read what I said above about cron entries in config.xml.



  • Perhaps this should be made as a package?


Log in to reply