Hot Backup and Restore

From Lianjapedia
Revision as of 03:24, 14 December 2017 by Barrymavin (Talk | contribs)

Jump to: navigation, search

Under construction

Backup and Restore during development

You can perform a Hot Backup and Restore of Apps and Databases while developing in the App Builder.

There is no need to close the App or Database to perform these operations.

Use "Apps | Backup App", "Apps | Restore App", "Database | Backup Database", "Database | Restore Database" in the MenuBar.

Bm-noteicon.png
Pro Tip

The Versions workspace keeps track of all of your modifications to your Apps and scripts and can be used to restore previous versions if you mess something up during development.

Backup App


Backup App


Backup App


Backup App


Backup Database


Backup Database


Backup Database


Backup Database


Restore App


Restore App


Restore App


Restore Database


Restore Database


Restore Database


Backup and Restore in the Cloud

Downtime of SaaS applications in the Cloud is not something your users are going to be happy about. So, with Lianja Cloud Server you can perform a Hot Backup and Restore of your databases while users are running Lianja Apps.

There is no need to shutdown IIS or Apache to perform these operations.

The backup operations can be run at scheduled intervals using cron on linux or task scheduler on Windows.

When the Cloud Server receives a request it uses the lockResource() function internally to get a shared lock on the named resource "LianjaCloudServerRequestLoop".

After it services the request it then continues in the request loop waiting for another request to arrive.

So, all you need to do in your cron job (or windows task scheduler job) is have a small Lianja runtime script or in this example an .rsp file (that can be run using wget) that locks the "LianjaCloudServerRequestLoop" exclusively.

Example

<%@ Language=VFP %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>
<body>
<%
unlockResource("LianjaCloudServerRequestLoop")
lockResource("LianjaCloudServerRequestLoop", "exclusive")
 
// Once the exclusive lock has been granted carry out required operations
// ...
// Then release the lock to unblock other requests
unlockResource("LianjaCloudServerRequestLoop")
%>
</body>
</html>
 
// Custom named resource:
lockResource("myresource", "exclusive")
 
// Resources can be unlocked individually by name:
unlockResource("myresource")
 
// Or all previously locked resources can be unlocked:
unlockresourceall()