Configuration

Archive works out of the box; every setting below has a sensible default. Change them in Archive → Settings, or in a config file for environments where admin changes are off.

Storage

SettingDefaultWhat it does
bundlePath @storage/archive/bundles Where finished bundles are kept. Craft aliases and environment variables are both resolved, so $ARCHIVE_PATH works. Keep it out of the webroot.
tempPath @storage/archive/tmp Where bundles are staged while being built. Cleared after each run. Needs room for one bundle’s worth of files.

Defaults for new exports

SettingDefaultWhat it does
defaultFormatjsonWhich format the export form and console command start on.
includeSchematrueWhether the site’s structure is written into the bundle.
includeAssetFilestrueWhether files from local volumes are copied in.
downloadRemoteAssetsfalseWhether files on S3, Spaces and other remote filesystems are downloaded. See Assets.
maxAssetFileSize256Megabytes. Files above this are referenced rather than copied, and noted in the warnings. 0 disables the limit.

Each of these is also a control on the export form, so a single run can depart from the default without changing it.

Privacy

SettingDefaultWhat it does
allowUserExport false Whether user accounts may be exported at all. While off, users aren’t offered on the export screen and addresses owned by a user account are held back. Password hashes are never exported regardless. See Users & privacy.

Retention

SettingDefaultWhat it does
retentionDays30Days to keep finished bundles. 0 keeps them indefinitely.
retentionCount20Maximum bundles to keep regardless of age. 0 keeps them all.

Both apply together — a bundle is pruned when it fails either test. Run php craft archive/bundles/prune to apply them on demand; schedule it if exports are automated.

Performance and logging

SettingDefaultWhat it does
batchSize100How many elements are loaded at a time while collecting. Lower it on a memory-tight host; raise it on a fast one.
logLevelinfoOne of error, warning, info, debug. Archive logs to its own storage/logs/archive.log, not into Craft’s general log.

Config file

On environments with allowAdminChanges off, or when settings should be in version control, create config/archive.php. It follows Craft’s usual multi-environment shape:

<?php

return [
    '*' => [
        'defaultFormat' => 'json',
        'includeSchema' => true,
        'maxAssetFileSize' => 256,
        'retentionDays' => 30,
        'retentionCount' => 20,
        'allowUserExport' => false,
    ],
    'production' => [
        // Somewhere with room, off the app server's small disk
        'bundlePath' => '$ARCHIVE_BUNDLE_PATH',
        'batchSize' => 250,
        'logLevel' => 'warning',
    ],
];

Values set in a config file override the ones in the database and appear read-only in the control panel, as with any Craft plugin.