PaaS to Local Migration
Use this workflow when the real issue lives in Liferay Cloud (LCP) and a clean local setup is not enough.
ldev provides the LCP-specific data-transfer commands. For self-hosted production, see Reproduce a Production Issue Locally.
The end-to-end flow:
- download the database backup from LCP
- import it locally
- optionally pull the Document Library
- start local
- triage and fix there first
1. Download the database from LCP
ldev db download --environment prd --project my-lcp-projectldev db download uses the LCP CLI (lcp) under the hood and stores the backup under docker/backups. You need the LCP CLI installed and authenticated, and LCP_PROJECT / LCP_ENVIRONMENT set (typically in docker/.env).
2. Import it into local PostgreSQL
ldev db import --force--force replaces the current local PostgreSQL data. db import does not require LCP — you can also import any local .sql, .gz, or .dump file:
ldev db import --file /path/to/backup.sql.gz --force3. (Optionally) download the Document Library from LCP
ldev db files-download \
--environment prd \
--project my-lcp-project \
--doclib-dest docker/doclib/productionIf your files are not in LCP, move them manually and mount them yourself:
ldev db files-mount --path /path/to/manual/doclib4. Start and inspect
ldev start
ldev doctor
ldev portal checkIf the imported dataset is too large for practical local work, inspect the site inventory first so you can decide what to prune:
ldev portal inventory sites --site /actualitat --with-structures --limit 20This scoped inventory is the exact view to use before pruning. For the full command reference, see Data and Deploy Commands.
Once you know which folders are oversized, run a dry-run prune:
ldev portal content prune --group-id 2710030 --root-folder 15588732 --keep 100 --dry-runApply only after checking the dry-run summary. If this becomes a repeated step in your local incident workflow, see Shrink Local Content.
5. Triage and fix locally
ldev logs diagnose --since 15m --json
ldev portal inventory page --url /home --json
ldev osgi diag com.acme.foo.web
ldev deploy module foo-web6. Verify before any production action
ldev portal check
ldev logs diagnose --since 5m --jsonThe safety benefit of ldev here is concrete: a cloud incident becomes a local, testable workflow.