OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) OSPi Interval – Data Backup and Restore

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #22546


    I put together a little script that will backup and restore the contents of the …/OSpi/data directory. This is necessary if you want to preserve your local settings when you update to a new version from GitHub. There have been two updates in the last couple of days, which is great!

    I hope others will find it useful.


    # Backup or restore the OSPi data files - D. Fox - 7/22/2013
    # Adjust SRCDIR and BACKUPDIR as required

    # Suggested installation:
    # copy this script to /usr/local/bin/
    # cd /usr/local/bin
    # ln -s


    # create the backup directory (with parents) if necessary
    if [ ! -d $BACKUPDIR ];then
    mkdir --parents $BACKUPDIR

    # restore the data if invoked with
    if [ `basename $0` == "" ]; then
    cp -a $BACKUPDIR/* $SRCDIR/
    exit 0

    # backup the data if invoked with
    cp -a $SRCDIR/* $BACKUPDIR/
    exit 0



    Just to add another option. If you use my mobile app you will notice the side panel has an export/import config. You can export the config, upgrade OSPi, and import the config back.

    Of course it’s helpful to know what my app backs up which is: programs, station names, master operation bits (which stations use a master station) and all device options.




    Is there any way to implement updates for Dan’s interval program from your web app? This would make the process of keeping OSPi updated much easier. Thanks again for your excellent work!



    I actually think it should be possible using Github since Ray has kept the OSPi extracted folder. I will play with it some and see what I can do.


    Dan in CA

    Keep in mind that with some updates it is only necessary to replace the Python file and it is not necessary to backup and restore the config files.
    In other updates there have been changes to various other files and it is best to do a full re-install. This will likely be the case when the parallel/sequential option is added.

    I just discovered that it is easy to auto detect the Pi board rev and have implemented code to set the GPIO pin configuration automatically. This eliminates the need to manually edit the code tor use with Rev 1 boards.


Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) OSPi Interval – Data Backup and Restore