Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 30-11-2018, 13:41   #1
Registered User
 
skkeith's Avatar

Join Date: Mar 2013
Location: Santa Cruz
Boat: 1975 Isander 28
Posts: 132
auto backup and recovery of routes and other settings

I just cooked up a technique to auto backup routes, etc and restore them on reboot. I use this for my overlayroot filesystem, so I can have a read only file system and persistent routes and settings across reboot.

The technique is simple, create a partition to be used only to store opencpn backup files. Add an entry to mount it in synchronous mode. For me my backup partition is mounted in /home/seth/bak, and opencpn settings are in /home/seth/.opencpn.

Example from /etc/fstab:
Code:
UUID=93027524-0cc4-4a13-a339-5dd44363a029 /home/seth/bak ext4 rw,sync 0 1
create an empty directory to mount to:
Code:
mkdir /home/seth/bak
cause the new partition to be mounted

Code:
mount -a
Now use this script, (mirror.sh in my example) and cause it to run at boot before opencpn is started:
Code:
#!/bin/bash
cp $2/* $1
while inotifywait -e modify,create,delete $1
do
     rsync -lptgoDv $1/* $2
done
I made the script run at boot time (on mint) by adding it as a startup command, whith the following parameters:
Code:
     /home/seth/mirror.sh /home/seth/.opencpn /home/seth/bak &
So what this does is to back up routes, etc as soon as they change, but onto a synchronous journaled file system, which is almost impossible to kill, but very slow. However we are just backing up the routes so it is fine. On the next boot, the backed up routes are copied into the ram disk so all settings persist even though opencpn is running from a ram disk.
skkeith is offline   Reply With Quote
Reply

Tags
route

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I did a thing: "Auto-routing" from existing routes TeknikFrik OpenCPN 6 17-08-2018 06:28
Lost Routes/GPS Settings etc spycatcher OpenCPN 10 29-07-2014 07:35
SeaTow or other recovery service - Moreton Bay ?? FraidNot Pacific & South China Sea 0 01-02-2010 13:16
FSK and PSK Settings for an Icom 710 iona350 Marine Electronics 5 17-08-2009 18:47
Settings for Fugawi 4 and GlobalSat BU-353 GPS?? ssullivan Navigation 4 02-01-2007 14:31

Advertise Here


All times are GMT -7. The time now is 21:53.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2025, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.