Skip to content

Commit

Permalink
Fix Update from the CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
M0rgan01 committed Feb 25, 2025
1 parent 11194bc commit 091cff6
Showing 1 changed file with 54 additions and 54 deletions.
108 changes: 54 additions & 54 deletions basics/keeping-up-to-date/update/upgrade-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,33 @@ parameters, it displays the available commands and associated general options.

Example of `bin/console` command execution:

```shell
```text
$ php bin/console
Usage:
command [options] [arguments]

command [options] [arguments]
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
help Displays help for a command
list List commands
help Displays help for a command
list List commands
backup
backup:create Create backup.
backup:list List existing backups.
backup:restore Restore your store.
backup:delete Remove a backup not anymore needed.
backup:create Create backup.
backup:list List existing backups.
backup:restore Restore your store.
backup:delete Remove a backup not anymore needed.
update
update:check-new-version Display the version the shop can update to.
update:check-requirements Check all prerequisites for an update.
update:start Update your store.
update:check-new-version Display the version the shop can update to.
update:check-requirements Check all prerequisites for an update.
update:start Update your store.
```

### List command
Expand All @@ -67,21 +67,21 @@ This command lists the Update Assistant CLI commands.

Example of list command execution:

```shell
```text
$ php bin/console list
Available commands:
help Displays help for a command
list List commands
help Displays help for a command
list List commands
backup
backup:create Create backup.
backup:list List existing backups.
backup:restore Restore your store.
backup:delete Remove a backup not anymore needed.
backup:create Create backup.
backup:list List existing backups.
backup:restore Restore your store.
backup:delete Remove a backup not anymore needed.
update
update:check-new-version Display the version the shop can update to.
update:check-requirements Check all prerequisites for an update.
update:start Update your store.
update:check-new-version Display the version the shop can update to.
update:check-requirements Check all prerequisites for an update.
update:start Update your store.
```

### Help command
Expand All @@ -91,7 +91,7 @@ Console component's built-in global options, and is therefore available for all

Example of help command execution:

```shell
```text
$ php bin/console backup:list help [command]
```

Expand All @@ -116,7 +116,7 @@ The Update Assistant CLI includes 4 commands dedicated to backup management:
The `backup:create` command is used to create a backup of your PrestaShop store. These backup files are stored in the
`/your-admin-directory/autoupgrade/backup` folder on your server.

```shell
```text
$ php bin/console backup:create help
backup:create: create a PrestaShop store backup
Expand Down Expand Up @@ -145,7 +145,7 @@ file. You must specify the location (`--from-config-file=.../folder1/configfile`

Example of `backup:create` command execution:

```shell
```text
$ php bin/console backup:create admin123 --include-images=1
Your files, database, and images will be backed up.
Starting backup...
Expand All @@ -155,7 +155,7 @@ Starting backup...

The `backup:list` command lists the backups available for your PrestaShop store.

```shell
```text
$ php bin/console backup:list help
backup:list: list all available backups for the store
Expand All @@ -174,7 +174,7 @@ The `[ADMIN_DIR]` argument is mandatory and is used to target the correct resour

Example of the `backup:list` command execution:

```shell
```text
$ php bin/console backup:list admin123
------------------+---------------+-----------------------------------------+
| Date | Version | File name |
Expand All @@ -188,7 +188,7 @@ $ php bin/console backup:list admin123
The `backup:restore` command is used to restore your PrestaShop store from backup files in the
`/your-admin-directory/autoupgrade/backup` folder on your server.

```shell
```text
$ php bin/console backup:restore help
backup:restore: restore the store to a previous state from a backup file
Expand All @@ -209,26 +209,26 @@ The `[BACKUP_NAME]` argument is intended to target the backup file (file_name) t

Example of `backup:restore` command execution:

```shell
```text
$ php bin/console backup:restore admin123 autoupgrade_save_8.1.6_15/07/2024_8:00
The restoration of your store is complete
```

This command also supports the “interactive mode”, which provides you with a contextual action, such as:

```shell
```text
$ php bin/console backup:restore admin123
Please select your backup:
[0] Date: 12/19/24 10:48:43, Version: 8.1.5, File name: V8.1.5_20241219-104843-XXX
[1] Date: 12/19/24 09:44:50, Version: 8.1.5, File name: V8.1.5_20241219-094450-XXX
[2] Exit the process
[0] Date: 12/19/24 10:48:43, Version: 8.1.5, File name: V8.1.5_20241219-104843-XXX
[1] Date: 12/19/24 09:44:50, Version: 8.1.5, File name: V8.1.5_20241219-094450-XXX
[2] Exit the process
```

### backup:delete command

The `backup:delete` command is used to delete a backup file from your PrestaShop store.

```shell
```text
$ php bin/console backup:delete help
backup:delete: delete a store backup file
Expand All @@ -249,19 +249,19 @@ The `[BACKUP_NAME]` argument is intended to target the backup file (file_name) t

Example of `backup:delete` command execution:

```shell
```text
$ php bin/console backup:delete admin123 autoupgrade_save_8.1.6_15/07/2024_8:00
The backup file has been successfully deleted
```

This command also supports the “interactive mode”, which provides you with a contextual action, such as:

```shell
```text
$ php bin/console backup:delete admin123
Please select your backup:
[0] Date: 12/19/24 10:48:43, Version: 8.1.5, File name: V8.1.5_20241219-104843-XXX
[1] Date: 12/19/24 09:44:50, Version: 8.1.5, File name: V8.1.5_20241219-094450-XXX
[2] Exit the process
[0] Date: 12/19/24 10:48:43, Version: 8.1.5, File name: V8.1.5_20241219-104843-XXX
[1] Date: 12/19/24 09:44:50, Version: 8.1.5, File name: V8.1.5_20241219-094450-XXX
[2] Exit the process
```

## Update commands
Expand All @@ -276,7 +276,7 @@ The Update Assistant CLI includes 3 commands dedicated to updates:

The `update:check-new-version` command is used to check whether new updates are available for your store.

```shell
```text
$ php bin/console update:check-new-version help
update:check-new-version: list PrestaShop updates available for the store
Expand All @@ -295,7 +295,7 @@ The `[ADMIN_DIR]` argument is mandatory and is used to target the correct resour

Example of the `update:check-new-version` command execution:

```shell
```text
$ php bin/console update:check-new-version admin123
-----------+----------+-------+---------------------------------------------------------------------------+
| Version | Channel | Type | Information |
Expand All @@ -317,7 +317,7 @@ $ php bin/console update:check-new-version admin123
The `update:check-requirements` command is used to check that your store meets the technical requirements before
updating.

```shell
```text
$ php bin/console update:check-requirements help
update:check-requirements: check if the store is compatible with the update requirements.
Expand Down Expand Up @@ -351,18 +351,18 @@ recent version of PrestaShop compatible with the PHP version of your server.

Example of execution of the `update:check-requirements` command, if all prerequisites have been successfully met:

```shell
```text
$ php bin/console update:check-requirements admin123
Checking requirements...
✓ The requirements check is complete, you can update your store to this version of PrestaShop.
```

Example of execution of the `update:check-requirements` command, if some prerequisites are not met:

```shell
```text
$ php bin/console update:check-requirements admin123
Checking requirements...
X PHP\'s "Safe mode" needs to be disabled.
X PHP's "Safe mode" needs to be disabled.
X Maintenance mode needs to be enabled. Enable maintenance mode and add your maintenance IP in Shop parameters > General > Maintenance.
⚠ Your current version of the module is out of date. Update now Modules > Module Manager > Updates
```
Expand All @@ -371,7 +371,7 @@ X Maintenance mode needs to be enabled. Enable maintenance mode and add your mai

The `update:start` command is used to update your PrestaShop store.

```shell
```text
$ php bin/console update:start help
update:start: launch a store update.
Expand Down Expand Up @@ -410,7 +410,7 @@ version of PrestaShop compatible with the PHP version of your server.

Example of `update:start` command execution:

```shell
```text
$ php bin/console update:start admin123
Starting update...
Destination version: 9.0.0
Expand Down

0 comments on commit 091cff6

Please sign in to comment.