backup:fetch
Downloads a backup archive from a remote HTTP(S) URL and extracts it into local backup storage under name, so it can subsequently be restored with backup:load.
Both arguments are required: name is the local name to store the backup under, source is the URL of a ZIP archive (as produced by zipping a backup:create output folder). The command downloads the archive to a temporary file, prints its size and SHA-256 checksum, then searches the archive for the summary.json that marks the backup’s root folder and verifies the node, relation, and file folders exist there before extracting - it fails if any of these checks do not pass.
Options:
-f,--force- overwrites a local backup with the samenameif one already exists. Without it, the command aborts when the name is already taken.
The temporary archive is removed again once extraction finishes successfully; if the command fails before that point (for example because required folders are missing from the archive), the downloaded temporary file is left behind on disk.
Help
php bin/console backup:fetch --helpDescription: Downloads backup from remote source to local storage. Usage: backup:fetch [options] [--] <name> <source> Arguments: name Name of the backup source URL to the remote backup, HTTP(S) protocol, must be ZIP archive Options: -f, --force|--no-force If active, will overwrite existing backups with the same name -h, --help Display help for the given command. When no command is given display help for the list command --silent Do not output any message -q, --quiet Only errors are displayed. All other output is suppressed -V, --version Display this application version --ansi|--no-ansi Force (or disable --no-ansi) ANSI output -n, --no-interaction Do not ask any interactive question -e, --env=ENV The Environment name. [default: "prod"] --no-debug Switch off debug mode. --profile Enables profiling (requires debug). -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Example
php bin/console backup:fetch reference-dataset https://github.com/ember-nexus/reference-dataset/archive/refs/tags/0.2.1.zip▄ ▄▀ ▀▄ Ember Nexus API ▀█▀ v0.3.0, production mode Backup Fetch ┌ Downloading and inspecting archive ─────────────────────────────────────────── │ Loaded archive is 8.51 MB big. │ SHA-256 sum of file is 7dd77bdcc3e87b41240f65a8f09d44a88726193d1c143c0608586e833eda1b81. │ Found backup inside ZIP in folder reference-dataset-0.2.2. │ Required folders exist. └ Download complete. ┌ Extracting schemas ─────────────────────────────────────────────────────────── └ All schemas extracted. ┌ Extracting nodes ───────────────────────────────────────────────────────────── └ All nodes extracted. ┌ Extracting relations ───────────────────────────────────────────────────────── └ All relations extracted. ┌ Extracting files ───────────────────────────────────────────────────────────── └ All files extracted. ┌ Extracting summary.json ────────────────────────────────────────────────────── └ summary.json extracted. ┌ Cleaning up temporary files ────────────────────────────────────────────────── └ Cleanup complete. ▶ Fetched backup successfully.