Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

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

    Scheduled Pinned Locked Moved 1.2.3-PRERELEASE-TESTING snapshots - RETIRED
    6 Posts 3 Posters 2.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tohil
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • C
        cmb
        last edited by

        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).

        1 Reply Last reply Reply Quote 0
        • T
          tohil
          last edited by

          @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.

          1 Reply Last reply Reply Quote 0
          • T
            tohil
            last edited by

            @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?

            1 Reply Last reply Reply Quote 0
            • C
              cmb
              last edited by

              @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.

              1 Reply Last reply Reply Quote 0
              • I
                Infininight
                last edited by

                Perhaps this should be made as a package?

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.