How to Archive and Restore an App

App Platform is a Platform-as-a-Service (PaaS) offering that allows developers to publish code directly to DigitalOcean servers without worrying about the underlying infrastructure.


You can archive an app to store its data and configuration. Archiving an app takes it offline and stops incurring charges for the app’s components, with the exception of associated databases and dedicated egress IPs. This can be useful for seasonal applications, temporary projects, and creating staging environments. You can also restore an archived app to resume using it.

When you archive an app, App Platform displays an offline page at the app’s URL. You can choose to display a custom offline page or DigitalOcean’s default offline page.

Using the Control Panel

To archive an app from the DigitalOcean Control Panel, click Apps from the left menu and then click the app you want to archive.

From the app’s overview page, click the Settings tab. Scroll down to the Maintenance and archive page section, click the Edit button, and select the page you want to display when the app is offline. The default offline page looks like this:

If you want to display a custom offline page, select the External URL option and then enter the URL of the page you want to display. The URL must be a valid URL starting with https://.

Once you have configured the offline page, click Save.

Next, scroll down to the Archive mode section and click the Archive button. In the Archive App window, enter the app’s name into the field to confirm that you want to archive the app and then click Archive. This triggers a new deployment and the app is archived. You can see the app’s offline page at the app’s URL.

To restore an archived app, click the Restore button. This triggers a new deployment and the app is restored.

Using the App Spec

To archive an app, update the app spec’s maintenance object with an archive field and set it to true, like this:

    
        
            
name: sample-golang
maintenance:
 archive: true
 offline_page_url: https://example.com/images/offline.png
services:
- name: web
   github:
     repo: digitalocean/sample-golang
     branch: master

        
    

Use the offline_page_url field to specify the URL of a custom offline page you want to display. Otherwise, the default offline page is displayed.

Once you have saved the changes, this triggers a new deployment that stops all the running components and serves an offline page at the app’s URL.

To restore the archived app, set the archive field to false.

In this article...