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. Its pretty automatic once you set it up, but it doesn't backup 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. It's written in Visual Basic 6, and should run without any installation in Windows 10. The zip.bat batch file uses tar, a file compression utility included in Windows 10.
Click on Zippy.exe in the project folder to make a backup.
The backup files are stored in the tar subfolder. I use WinRAR to inspect them and extract stuff, but you can also type "tar --help" from the command line to get the commands to extract the files if you need to.

Older Windows

If you are running an older version of Windows you may need to download ZippySetup.exe which will also install the command line version of PKZIP called PKZIPC. You can use it instead of tar if you prefer. The main command that needs to be changed would read
"C:\Program Files\PKWARE\PKZIPC\pkzipc.exe" -add=update -nofix -path %1 *.a* *.b* *.c* *.d* *.gif
"C:\Program Files\PKWARE\PKZIPC\pkzipc.exe" -add=update -nofix -path %1 *.jpg *.sl* *.tp* *.ini *.inc
as shown here:
You can download zip1.bat (to work with PKZIPC) but be sure to rename it to zip.bat or it won't work.

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 www.sacoronavirus.co.za.