Saturday, April 03, 2021

Backing up your Clarion projects

SoftVelocity Clarion

Whenever you start work on a new project, it's too easy to forget to make backups. Even if you save your work often, what do you do if Clarion crashes, or you break something and need to go back to the previous version of the project? For US$99 DeveloperTeam has a nifty template you can use for automatic backups every time you do a compile. It's pretty automatic once you set it up, but it doesn't back up everything, just the really important bits.
Another option is to use Zippy Backup Assist, a free utility I wrote for my Access97 development work after I threw away a whole day's work by mistake. You copy the Zippy.exe program into your project folder, as well as zip.bat, which does most of the work. Then you edit the zip.bat file and assign a name for the project. In this case, the name is "learn" and the project is called "Learning Clarion".
Zippy.exe calls the zip.bat file in the same folder as it is running from, and passes it a parameter, comprising the project name (set this using the ZIPPY= command in zip.bat) plus today's date (and time). It's written in Visual Basic 6, and runs fine in Windows 10 and 11.


Please download ZippySetup.exe which will also install the command line version of PKZIP called PKZIPC. (My installer and Zippy.exe is not signed. Sorry!) There are two versions of the zip.bat file available: Whichever one you choose, rename it to zip.bat, or it won't work. The backup files are stored in a "zip" folder

Backup with every build

If you want to make a backup after every successful build, then there is an additional step you should take:
From the "Project" menu, select "Project Options..." and go to the "Build Events" tab. Use the Ellipsis button to select the Zippy.exe in the same folder as your project. Make sure the post-build event is set to "On Successful Build" so you don't back up a bad set of data. If you do a lot of builds in a day, then it may be a backup too often. The Developer Team template makes a backup before the build, and it gives each backup a sequential number, so you can work backwards if needed. Or you can do both.

Backup to the Cloud or another PC

Making zip copies of the project is a good way to keep a timeline, but if your hard drive crashes, you don't have a backup. A backup is only a backup if you have two other copies of the file, one on another media like a CD ROM or external hard drive (try SyncTrayzor or FreeFileSync), and one in the cloud or offline storage somewhere. Something like Google Drive, Dropbox, iDrive, Carbonite, etc.

No comments:

26-Mar-2020: According to SA government regulations, all Internet sites operating within .za top level domain name must have a landing page with a visible link to