I finished my rebuild index script and reviewde my Backup script that uses PowerArchiver.
I modified the template invoice application to include a file utilities menu choice.
The Rebuild Index script looks to a table appidx which stores a list of *.dbf tables and their associated index definitions. Ideally no one goes near this table except for the developer. I entered the table names and definitions by hand. You only do it rarely - when you finish an application and when you add a needed index in the future development. Ideally you would drop the table from the database using xbasic, then add it back as part of running this script.
The Backup script is modified for directory structure reasons. If you run PowerArchiver from the command line it will include subdirectories and if these include your backup files you will quickly run out of hard drive...I settled on making two subdirectories "backup" and "data", where the application goes in the data directory and the backups go in the backup directory. The code is portable and the zip file creates them by default.
There is a simple "delete_me" file in the backup directory else the directory wouldn't be created by the zip...Just delete it.
If you need more utilities see Finnian Lennon site for reindex, pack and update data dictionary scripts, and I poached an undelete script from Dr Waynes site.
With version 5 the backup utilities days are numbered, but I am not so sure about the index rebuild...unless the version 5 indexes are rock solid. But end users can are ingeniously stupid and this script should help clean up the messes.
I modified the template invoice application to include a file utilities menu choice.
The Rebuild Index script looks to a table appidx which stores a list of *.dbf tables and their associated index definitions. Ideally no one goes near this table except for the developer. I entered the table names and definitions by hand. You only do it rarely - when you finish an application and when you add a needed index in the future development. Ideally you would drop the table from the database using xbasic, then add it back as part of running this script.
The Backup script is modified for directory structure reasons. If you run PowerArchiver from the command line it will include subdirectories and if these include your backup files you will quickly run out of hard drive...I settled on making two subdirectories "backup" and "data", where the application goes in the data directory and the backups go in the backup directory. The code is portable and the zip file creates them by default.
There is a simple "delete_me" file in the backup directory else the directory wouldn't be created by the zip...Just delete it.
If you need more utilities see Finnian Lennon site for reindex, pack and update data dictionary scripts, and I poached an undelete script from Dr Waynes site.
With version 5 the backup utilities days are numbered, but I am not so sure about the index rebuild...unless the version 5 indexes are rock solid. But end users can are ingeniously stupid and this script should help clean up the messes.
Comment