melloa: I save my config every time it changes... have a script to check the checksum that runs hourly, if it changes, it copies it to the storage and takes a snapshot. :D
#!/bin/bash
#
# configbak
#
# 131120 cmh (cmh@db94.net)
#
# Purpose: Take a backup of the FreeNAS config file
#
exec 2> /mnt/sto/tmp/debug-configbak
set -x
# var defs
DB=freenas-v1.db
ACTIVE=/data/$DB
BAKSET=sto/backup/config
BAK=/mnt/$BAKSET/$DB
# Make sure I can read the database
if [[ ! -r $ACTIVE || ! -w $BAK ]]
then
echo "Error: can't read $ACTIVE or write $BAK"
exit 1
fi
# Check the active version
actsum=$(cksum $ACTIVE)
actsum=${actsum%% *}
# Check the backup version
# Direct STDERR to null in case the file doesn't exist
baksum=$(cksum $BAK 2> /dev/null)
baksum=${baksum%% *}
# See if the checksum changed
if [[ $actsum != $baksum ]]
then
# Check the validity of the active before copying
out=$(/usr/local/bin/sqlite3 $ACTIVE 'pragma integrity_check')
if [[ $out != "ok" ]]
then
echo -e "Database integrity check failed:\n$out" | mail -s "ALERT: FreeNAS database not ok" root
exit 1
fi
# Overwrite the backup
cp $ACTIVE $BAK
fi
Not that I'm aware of except for the posting by @m0nkey_ above (I didn't know that either). I would have expected the LED to mean there was activity going on.Hey, @joeschmuck, did any of the above changed? In other words, any way to identify the failed USB to be replaced?
Of course I have to ask, how often do you change your FreeNAS configuration? I change mine maybe twice every 6 months and that is a big maybe. When I do make a change I manually create a config file backup.
That's what it was there for!and it did save my life once :)
That's what it was there for!
Of course I have to ask, how often do you change your FreeNAS configuration? I change mine maybe twice every 6 months and that is a big maybe. When I do make a change I manually create a config file backup.
but that was shot down as it's generally considered to be the server admin's responsibility to do backups, not the OS itself.
For me, I just upgraded my backup FreeNAS system to 9.10.2 yesterday and once that was completed I created a new configuration backup. Now I didn't really make any changes to my configuration however with a newer OS, I figure it's the safe and smart thing to do.It's been a while since I set up my automatic backups, but I was surprised to see how often the config file itself changes, even if I'm not making major changes to the config on the system. Little things here and there.
I set up a 5-way mirror on indential Kingston DataTraveler 8Gb USB sticks.
One of them failed. I figured out which one. Tried to dd the thing and all I get are errors. Now I can't dd it at all... Is there any way to force dd to work, or is there any other cam command to run that might fix it?
-- nohup dd if=/dev/zero of=/dev/da3 bs=98304 count=78899 conv=notrunc,noerror >dd_da3.log 2>dd_da3.err &
-- nohup dd if=/dev/zero of=/dev/da3 conv=noerror,notrunc >dd_da3.log 2>dd_da3.err &
-- dd: /dev/da3: Input/output error
-- 1+0 records in
-- 0+0 records out
-- 0 bytes transferred in 8.426213 secs (0 bytes/sec)
-- nohup dd if=/dev/zero of=/dev/da3 conv=noerror,notrunc