Legacy Knowledge Base
Published Jun. 30, 2025

Automated download of PaaS backups

Written By

Sorin Pop

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • we want to set up an automated download of the DXP-cloud-backup. To connect to the server we have to run the following procedure:


    - lcp auth token 
    - lcp remote
    - lcp shell

    Please can you help us finding the required token?
    Alternatively, please inform us if there is another way of ensuring the backup.

Environment

  • PaaS

Resolution

  • Please find below some information that might be helpful.
     
    1. Use the Liferay Cloud CLI tool to download backups. The command lcp backup download --backupId [ID] downloads both the database and document library volumes for the given backup ID. For specific volumes, use the flags --database or --doclib. Improve download speeds for the document library (database download is unaffected) using the --concurrency flag (up to 10,000 parallel downloads). This requires CLI version 3.12.0+, Backup service 5.9.0+, and Liferay service 5.3.0+.

    2. Use Backup APIs for CLI versions before 3.12.0 or Backup service before 5.9.0. Authenticate with basic authentication (username/password) or a user access token (mandatory for SSO). The API base URL is https://backup-[Project name]-[Environment].lfr.cloud. Append specific endpoints for database (/backup/download/database/[ID]) or document library downloads. Example using curl and basic authentication: curl -X GET https://backup-[Project name]-[Environment].lfr.cloud/backup/download/database/[ID] -u user@domain.com:password --output database.gz. For Backup service versions 3.2.0+, use the header dxpcloud-authorization: Bearer [User token]. For older versions, use Authorization: Bearer [Project master token] (retrieved via env | grep LCP_PROJECT_MASTER_TOKEN in the Liferay Cloud console).

    3. For Backup service versions older than 4.3.5, download backups through the Liferay Cloud Console. As an administrator, navigate to the Backups page in the target environment, select the backup, click Actions (⋮), choose Download, and click the respective database (.gz) or Liferay (.tgz) file. Note: for Backup service versions before 4.2, the database is a .tgz archive.
    Automating the download process can be achieved through scripts leveraging the Backup APIs or the CLI. The command lcp auth token (CLI 3.14.0+) retrieves the authentication token for scripting purposes.
     
    Below resources/articles might also help providing more accurate details:
     
    https://learn.liferay.com/w/liferay-cloud/platform-services/backup-service/downloading-and-uploading-backups
     
    https://help.liferay.com/hc/en-us/articles/17183733950349-Liferay-Cloud-Platform-CLI-Backup-Management
     
    https://help.liferay.com/hc/en-us/articles/19941006498573-New-CLI-Commend-Display-Auth-Token-CLI-3-14-0

 

Did this article resolve your issue ?

Legacy Knowledge Base