# urbestack-export

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 command, run as root in the server shell.

## Usage

```
urbestack-export [--full] [--encrypt --passphrase-stdin] [--name FILE] [--stdout]
```

## Description

Exports the UrbeStack server configuration as JSON. The default export is a server profile with settings, packages, overrides, hooks, custom Apache configuration, mail and firewall configuration, server-wide ModSecurity settings, and enabled PHP extensions for each installed PHP version. It records each plugin's name, version, and enabled status. The profile omits host identity settings and the SSH port.

--full adds user accounts with password hashes, second-factor secrets, and recovery codes. It also adds domains with their DNS, mail, and ModSecurity settings, along with customer SSH keys, database definitions, and database users and grants. Database contents travel with backups or migration. --full requires --encrypt unless you specify --allow-plain.

--encrypt encrypts the export file and requires --passphrase-stdin. The command reads the passphrase from the first line of standard input. Combining --full with --encrypt includes DKIM private keys and smarthost passwords.

By default, the command writes to UrbeStack's exports directory using a filename of the form urbestack-HOST-TIMESTAMP.json. Use --name to set a filename of up to 128 characters. Encrypted files get an .enc suffix if the filename does not already end in .enc. An existing file with the same output name is replaced.

--stdout sends the export to standard output in plaintext, even when --encrypt is set. With --full and --encrypt, that plaintext includes the secrets selected for a full encrypted export.

## Same in the API

- [POST /export](https://urbestack.com/docs/api/post-export.md): Create an export file on the server
