What it does: Imports a previously exported backup profile.
You can either specify a JSON file using the fileOrJSON argument OR you can pipe JSON data to the standard input.
By default the imported data is saved as a brand new backup profile. Use the --profile option to import into a specific profile ID instead.
Syntax: akeeba:profile:import [FILEORJSON] [--format=FORMAT] [--profile=ID] [--force]
Arguments
This command takes one optional argument.
A path to an Akeeba Backup profile export JSON file or a literal JSON string. Uses STDIN if omitted which allows you to pipe raw JSON into the command's standard input.
Pipe example: cat profile.json | php /path/to/joomla.php akeeba:profile:import
Options
Optional. The format for the response. Use json to get a JSON-parseable numeric ID of the new backup profile. Values: json, text
Optional. Import into this specific backup profile ID instead of creating a new profile. Must be a positive integer.
If the profile ID does not exist yet it is created with exactly that ID. If it already exists the command refuses to run unless --force is also used.
When this option is omitted the profile ID is assigned automatically by the database, which is the behaviour of all versions before 10.4.0.
Optional. Allow the profile specified in --profile to be overwritten if it already exists. Without it, importing over an existing profile is refused.
The default backup profile (#1) always exists, so --profile=1 --force is the only way to replace it from the command line.
Overwriting only replaces the information present in the imported JSON document. If the profile was exported without the --filters option its file and database exclusion filters are not part of the JSON document, and the filters already set up in the overwritten profile are left untouched.
This option has no effect unless --profile is also used.
Exit codes
One of the following exit codes will be set when the command finishes running:
The command completed without an error.
The input could not be parsed as JSON, or the file given in the FILEORJSON argument does not exist.
The profile could not be saved to the database.
The value of --profile is not a positive integer.
The profile given in --profile already exists and --force was not used.
The Akeeba Backup engine could not be loaded.