I have this script to backup an open Sybase database on the Mac. It works on some machines, but on others no file is created. I have no idea why - same version of Servoy, Java, ASA, OSX.
It creates a subfolder in the Backups folder using the date/time as the subfolder name, eg Backups/2007_05_22_1201
Is there a better syntax?
var UserDir = plugins.it2be_tools.client().userDir
var BackupDir = UserDir + "/backups/"
plugins.file.createFolder(BackupDir)
var DBPath = UserDir + "/database/"
var BackupFolderName = utils.dateFormat(application.getTimeStamp(), "yyyy_MM_dd_HHmm")
var BackupPath = BackupDir + BackupFolderName
var SybasePath = UserDir + "/sybase_db/"
application.executeProgram( SybasePath+"dbbackup", "-y", "-c uid=dba;pwd=sql;dbn=user_data", BackupPath)
Thanks for the excellent tips. I was hopeful that they would do the trick, but sadly no.
I’ve checked that there are no spaces in the path
I’ve confirmed that the permissions (via Get Info) are the same at all sites on the Servoy folder, the Sybase_db folder, the backups folder and the dbbackup executable.
Both sites are Macs OSX 10.4.9 with PowerPC G4 processord, Java J2SE 5.0, Servoy 3.1.4
I’ve confirmed that I can run dbbackup at both sites in a terminal window.
Even stranger, the backups were running previously at the clients site. The solution they are running now is a direct import of the servoy file exported from my site.
A revelation! I discovered the cause of the problem, the affected machines have all installed the Mac Security Update 2007-004 or 2007-005. I was able to replicate it here. So that completely explains the odd behaviour. If you have a moment, can you try it too?
dyld: Library not loaded: libdbtool9_r.dylib
Referenced from: /Applications/CuttingEdgeDistribution/CuttingEdge/sybase_db/dbbackup
Reason: image not found
I don’t have access to the machine at the moment, but the sh script runs fine from same software on OSX 10.4
The ASA9 files libdbtool9_r.dylib and dbbackup are present in the sybase_db folder.
In that case I’d recommend your customers to downgrade to 10.4. If the software is essential to them I assume they can wait for 10.5 until you have the ability to support it.