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

Sign In or Register to comment.