CubeSQL Database Backup

Hello,

in my app I have access to a CubeSQL database. Now I want to copy this CubeSQL database to a local SQLite-Database. In Xojo I normally would use “db.backup” but this doesn’t work with CubeSQL. Is there another way?

Thank You

You can use the CubeSQL admin to connect to your server and then download database to your desktop.
or use this in your code :

 mDatabase.SQLExecute "BACKUP NOW '" + dbName +"'"

You will find more example in your CubeSQL admin, if you have install the full package.

Or, you can simply stop serving the database temporarily (to make sure all data have been written to the fie), and copy it from the directory it is in on the server to wherever you want to. It is nothing more than a standard sqlite file. You can then start serving it again if you want to.

If you’re not sure where it is located on the server, you can see the path to the “databases” directory from within the admin app (under Preferences, as I recall), as well as stopping/starting the serving of the particular database.

You can define a schedule in CubeSQL admin to regularly perform backups.
http://www.sqlabs.com/blog/2012/08/cubesql-and-schedule-backups/

I use the schedule as well to upload such backups to a SFTP server. I have written a utility for OSX which is doing the upload. If you are interested, you can download the installer from my server here: http://www.osswald.com/downloads/BackupConfigurator.pkg

(MD5 Hash : 0108bf9f5dd5955b50edbac4dce8a98f)

The installer copies Backup Configurator to the applications folder. The GUI app is installing and configuring a console app which is doing the actual upload of CubeSQL backup files. The console up can be called from a CubeSQL schedule. It comes with a little help page which should get you up and running with it.

[quote=67226:@Christian Präger]Hello,

in my app I have access to a CubeSQL database. Now I want to copy this CubeSQL database to a local SQLite-Database. In Xojo I normally would use “db.backup” but this doesn’t work with CubeSQL. Is there another way?

Thank You[/quote]
… and of course there is the DOWNLOAD DATABASE command of cubesql.

Check the example which comes with CubeSQL, on OSX it is located here : /Applications/cubeSQL/Clients/REAL\ Studio/REAL\ Studio\ Examples/UploadDownload/UploadDownload.rbp

i think the link does not work… nothing to download.