BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

Project data & BIM
About BIM-based management of attributes, schedules, templates, favorites, hotlinks, projects in general, quality assurance, etc.

Backing Up The AutoSave Folders With cron

(Cross-posted. Thought it might be of interest. OS X only, but I would think there's a Windows analog somehow.)

We have had a handful of cases where ArchiCAD autosave recovery has failed when it should have succeeded. We have also had cases of human error where the autosave never had a chance.

Since ArchiCAD deletes the autosave data once it decides (right or wrong) that it's not needed, you don't get a second chance.

Unless you routinely back up the autosave folders.

You'd want to do this automatically of course. Automator might work, but as far as I can tell Automator actions can't run hidden. (You could use Script Timer to schedule them.)

Since OS X is built on BSD, a flavor of Unix, it includes the system utility cron. Cron is a scheduler for command line tasks. For OS X, 'command line' = the Terminal application.

Command line people, and I am most emphatically not one of them, can do virtually anything to their system via the Terminal. At the very simplest, you could do anything for which you are accustomed to using the Finder, such as copy files and folders.

Any command that could typed into the command line can be set to automatically run on a schedule with cron.

This scheme uses two cron tasks to copy all the 'ArchiCAD AutoSave' folders from ~/Library/Application Support. The data is alternately copied to two folders, ~/Documents/ACTempBackup/Backup1 and [yadayada]/Backup2. (~=your home folder.) The tasks take turns running every ten minutes on weekdays.

Having two folders covers this unlikely case: You reopen AC, which creates a new AutoSave folder, and right at that moment the cron task goes off and overwrites your backup with a new empty folder. If that happened, you would use the data in the other folder, which is only ten minutes older.

Cutting to the chase, and pardon the jargon, you're going to add two lines to your crontab:
0,20,40	*	*	*	mon,tue,wed,thu,fri	find ~/Library/Application\ Support/Graphisoft -name "ArchiCAD\ AutoSave\ Folder*" -exec cp -R -f '{}' ~/Documents/ACTempBackup/Backup1 \;
That saves on the hour, and at 20 and 40 minutes past. This saves to the other folder at 10, 30, and 50 minutes past:
10,30,50	*	*	*	mon,tue,wed,thu,fri	find ~/Library/Application\ Support/Graphisoft -name "ArchiCAD\ AutoSave\ Folder*" -exec cp -R -f '{}' ~/Documents/ACTempBackup/Backup2 \;
The command assumes a folder in Documents called 'ACTempBackup', and within that, folders called 'Backup1' and 'Backup2'. You could adjust the interval or paths as you like.

The 'crontab' is a hidden resource where the schedule is recorded. The most user-friendly way of editing it is the OS X application CronniX. See image.

Cronnix is freeware, but if you find it works for you, consider donating to the developers.

If you have an autosave failure, you can use the data at Documents/ACTempBackup/Backup1[or 2, whichever is fresher]. It seems you can simply copy the whole 'Archicad AutoSave Folder[-n]' from the backup location to Application Support/Graphisoft/. When you relaunch, AC will see the data in there and offer you the recovery dialog. (More on manual recovery of autosave data here.)

Thanks to Karl O for the Unix hint. My two-folder, two-task solution is a little clunky, IMO. The next version should automatically rotate the backups, BPN-style.
James Murray

Archicad 25 • Rill Architects • macOS • OnLand.info
1 REPLY 1
Cronnix tip: Use the Expert tab to set the schedule. An asterisk means 'every', so the task will run at the indicated minutes on every hour.
cronnix2.png
James Murray

Archicad 25 • Rill Architects • macOS • OnLand.info
Learn and get certified!