Backing up critical files.
After a lot of help from John and getting my Kiwi/BBAI-64 in a permanent location on the opposite coast, I have been crafting a backup script file to run nightly in case I inadvertently burn my Kiwi down and I have to re-image it. My script dumps the tarball onto a mounted flash drive and looks like this:
----------------------
#!/bin/bash
#Variables.
X=$(date +%F)
DIR1=/root/assembled-files
DIR2=/root/compressed-files
#Prep Directories.
if [ -d "$DIR1" ]; then
echo "Prep Directory Present."
else mkdir /root/assembled-files
fi
if [ -d "$DIR2" ]; then
echo "Compression Directory Present."
else mkdir /root/compressed-files
fi
#Remove existing files.
rm /root/assembled-files/*
rm /root/compressed-files/*
#Move and compress.
echo "Copying Configuration files to Prep Directory."
cp /root/kiwi.config/*.* /root/assembled-files/
echo "Tarballing files."
cd /root/assembled-files
tar -czf /root/compressed-files/"KiwiSDR_"$X.tar.gz .
mv /root/compressed-files/"KiwiSDR_"$X.tar.gz /media/storage/kiwi-config/
exit 0
------------------
There is also a cron job that monitors the output directory and deletes any archives older than 60 days.
Right now I am just taking ALL of the files from the /root/kiwi.config directory (even though I know I may not use some of them). The idea was that if I had to re-image and re-compile the Kiwi, I'd individually put back the files that held the bookmarks, custom band definitions and the like to re-customize it.
My question is: Are the OTHER files I should consider keeping as well? The resultant tarball is about 1.1M and I have 16G storage on the external flash drive, so storage isn't a problem...
Thoughts, ideas, are welcome.
73,
Carl, K6CRS/VE6CS
Comments
That should be okay. The idea was that all the necessary configuration would be stored in one directory: /root/kiwi.config
Thanks, John!
Carl
Currently running Version 2 Kiwi, Is there a simplified backup procedure that is recommended?
Thanks
Steve, NA5C
The admin page backup tab should work well. The user interface is improved over previous versions.
Even though this is a complete backup designed to create an sd card to completely re-flash the Beagle, it is possible to access individual files from the sd card in case you wanted to access specific files. Like the configuration files for example.
Thank You John, I will give it a try..
Is there any way to backup an image to a USB stick? It saves opening the metal case each time.
Also, I think the config backup above should be standard with a copy saved in another directory in case of user error. Especially new user error.