Skip to content
This repository was archived by the owner on Jul 25, 2026. It is now read-only.
sqrwfPublic archive

About

OpenWrt init script to preserve the collectd RRD database across reboots

Resources

Stars

11 stars

Watchers

1 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

OpenWrt RRDBackup

Note/update

This script has been integrated, along with some improvements, into luci-app-statistics starting with OpenWrt 23.05.2, making that the the preferred and easiest way to have your RRD database persist across reboots.

However, this script is neither outdated nor obsolete. It is still useful if you want to adjust backup parameters, don't have LuCI and/or its Statistics app installed, or prefer to keep the backup functionality standalone.

Rationale

By default, with OpenWrt the collectd RRD database is kept in temporary (RAM) storage. This simple init script backups the database on router shutdown and restores it on router startup (with optional periodic backups in between). This way, the RRD database persists across (planned) reboots.

Prerequisites

None that aren't covered with a basic OpenWrt install. The script doesn't really make sense if you're not running collectd, though. 😉

Compatibility

Tested with OpenWrt 19.07, 21.02, 22.03, and 23.05. This is a very basic script using very fundamental OpenWrt mechanisms that haven't changed in eons and aren't expected to change anytime soon.

Installation

  • upload /etc/init.d/rrdbackup and make it executable (chmod +x /etc/init.d/rrdbackup)

  • optional: adjust the variables for backup path and filename at the top of the script if you're unhappy with the defaults

  • enable the script: /etc/init.d/rrdbackup enable

  • optional: make an entry in crontab to backup in regular intervals (e.g.
    0 */6 * * * /etc/init.d/rrdbackup backup
    for a backup every 6 hours)

About

OpenWrt init script to preserve the collectd RRD database across reboots

Resources

Stars

11 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages