Migration script command syntax and options

Use the following syntax to run the migration script:
./upgrade_mongo.sh [OPTIONS]
You can customize the migration process by specifying the following options:
  • --target-version=VERSION: Specifies the target MongoDB version you are upgrading to. The default value is 8.2.3.
  • --old-version=VERSION: Specifies your current MongoDB version. The default value is 4.0.5.
  • --data-dir=PATH: Specifies the path to your MongoDB data directory. The default value is /opt/data.
  • --keep-container=true|false: Specifies whether to keep the MongoDB container after the upgrade is complete. The default value is false.
  • --help: Displays the help message and available command options
Note:
  • If you execute ./upgrade_mongo.sh without any arguments, the script will prompt you to confirm the use of default settings.
  • When providing partial arguments, the script identifies any missing parameters, displays their default values, and requests verification before continuing.