You are here

Backup node configuration

9 posts / 0 new
Last post
K5CS
Backup node configuration
I have searched through the ARDEN documentation and there appears to be no way to backup the node configuration to a PC.  Is this something that be added as a feature in future builds?  I've had a few times where I had to completely reconfigure a node. I keep a hard copy of each page of my config but restoring from a backup would be a great timesaver.

Charles, K5CS
 
w6bi
w6bi's picture
Backup feature
It's being worked on - look for it in a nightly build - sooner or later...

Orv W6BI

 
K5CS
Backup feature
OK thanks!  Can't come soon enough...

Charles, K5CS
 
DM6BS
DM6BS's picture
Re: Backup node configuration

I don't know if this is what Orv was hinting, one way would be

> for node in localnode thisnode thatnode; do
> ssh $node.local.mesh -l root -p 2222 sysupgrade -b - > /where/ever/sysupgrade-b-$node.tar.gz
> done

(with appropriate ssh keys, YMMV, etc)

However, there's no easy way to (auto-)provision a node with an existing backup as far as I know.

vy 73 de Bernhard DM6BS

w6bi
w6bi's picture
Backup & restore
Backup and restore have been in the nightly builds for quite a few weeks now.  You'll find them in the software update area.   I've tested them a few times - seem to work as advertised.  As long as you can get to the UI, you can restore from a backup  (if you're restoring to a different model of hardware, restore at your own risk).

Orv W6BI
DM6BS
DM6BS's picture
Backup & restore

> Backup and restore have been in the nightly builds for quite a few weeks now. You'll find them in the software update area.

Well, yes ... but I usually forget to manually back up things, so I prefer to automate that
(and anyway, it is always better to take 1hr to automate something than 5sec to press a button :-) )

Are backups created via the GUI compatible with 'sysupgrade -b'?
The backup file seems to be a gzipped tar?

mni tnx es vy 73 de Bernhard DM6BS

w6bi
w6bi's picture
Backups
Bernhard, yes the backups are gzipped tar files.   As far as working with sysupgrade -b "not guaranteed to work now or in the future" is what I got from the devs.

Orv W6BI
DM6BS
DM6BS's picture
Re. Backups

Orv, mni tnx for inquiring.

vy 73 de Bernhard DM6BS

DM6BS
DM6BS's picture
Backup automation
I have the following shell script running in a cron docker container for a few weeks now, seems to work fine for my purposes.
You'll have to set up the ssh stuff manually:
  • creating the configbackup key pair (only once)
  • installing the public key on the nodes, adding the nodes host keys to known_hosts (once per node)
Also, there's no cleanup of old backups yet, so you have to delete stuff every now and then.
vy 73 de DM6BS
#!/bin/sh

echo "########## $0 starting at `date -Iseconds`"

#set -xv

top=/app
#top=./

now=`date -Iminutes`

key=${top}/.ssh/id_rsa_configbackup
kno=${top}/.ssh/known_hosts

dir=${top}/node-backups/${now}

if [ ! -d ${dir} ]; then
  mkdir -p ${dir}
fi

for node in NODE-1 NODE-2 NODE-3; do
  echo "### Backup ${node} ###"
  ping -q -c 5 ${node}.local.mesh
  status=$?
  if [ ${status} -ne 0 ]; then
      echo "##### Backup ${node} unknown/offline"
  else
    ssh -p 2222 -l root -i "${key}" -o"UserKnownHostsFile=${kno}" ${node}.local.mesh /usr/local/bin/backup \>/dev/null \&\& cat /tmp/node-backup.backup > ${dir}/${node}.tar.gz
    status=$?
    if [ ${status} -ne 0 ]; then
      echo "##### Backup ${node} failed: ${status}"
    fi
 fi
done

echo "########## $0 done at `date -Iseconds`"

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer