PLEASE NOTE THAT THIS ASSUMES THAT YOU ARE RUNNING ONLY JAYFISH ON YOUR MARIADB/pi instance … and that you DO NOT HAVE ANY CUSTOM DB’s running alongside Jayfish.  If your install is STOCK and only runs Jayfish … your good … if not … my script does NOT know about your other db’s on the pi and will destroy them.  If you need help here or advice, ask … if you have stock Jayfish and are low on disk space (mysteriously) then proceed .. your good.  IF YOUR AN EXPERT – MODIFY MY SCRIPT TO INCLUDE YOUR DB’s (Only if your pretty good at Unix.) Again … stock install … your good.

If you have the latest install files, and have run the base-setup.sh script you will notice that you have a new script called.

ibdata1flush.sh

If you don’t see this, you need to refresh your install folder, or create a new one, download base-setup.sh and execute it again.

Ensure that you are in the base-setup folder that has all the install files before you execute this file, as it relies on files in the setup folder .. DO NOT EXECUTE IT outside the folder.  As I don’t know what you might call the folder I have it executing from where ever you created it.

So for me to get the new setup I would do this … considering that my original setup folder to install jayfish was /home/pi/j5 I would …

cd /home/pi/j5
rm *
wget http://jayfish.net/setup/j5/base-setup.sh
sh base-setup.sh

And that’s it … then I would from there proceed to the next step … please read on.

NOTE: I seriously encourage you to run your jayfish backup before executing this.  If there is a mishap you can use the jayfish restore to restore your system.  I have tested this thoroughly, but you never know.  So I would do this …

sudo sh backup.sh

then …

sudo sh ibdata1flush.sh

It will automatically reboot when done, and your good, you should see your disk space cleaned up.  (WATCH IT, it will show you before and after ibdata1 sizes, and then give you a 10 second wait notice before it reboots.)

IF for some reason it breaks !!!! you still have your backup and can restore it by doing a restore. (Read about how to restore here .)

CRON FOR ADVANCED USERS (Unix experts.)

FOR THOSE WHO WOULD LIKE TO CRON THIS, so it is an automatic monthly job.  Feel free to do so but take note  … you have to make your own script that FIRST navigates to the setup folder to execute ibdata1flush.sh

So your script would have to read ….

cd /home/pi/j5
sudo sh ibdata1flush.sh

If that makes sense, go ahead .. if not DO IT MANUALLY WHEN YOU SEE YOUR RUNNING LOW ON SPACE !! i