-
Notifications
You must be signed in to change notification settings - Fork 137
Upgrade Script
Jon Crain edited this page May 1, 2020
·
2 revisions
Newer versions of MunkiReport include an upgrade script for git
installs located at ./build/mr_upgrade.py
.
It requires python3.7
+ and also includes a requirements file at ./build/requirements.txt
To install the requirements file, run pip3 install -r requirements.txt
The script takes the following arguments:
-i or --info "Print info on the MunkiReport install."
### Example:
[2020-05-01 14:16:55] [INFO ] Current version: 5.3.6.4110
[2020-05-01 14:16:55] [INFO ] Latest version: 5.4.1
[2020-05-01 14:16:55] [INFO ] Install path: /path/to/munkireport/munkireport-wip/
[2020-05-01 14:16:55] [INFO ] Database type: sqlite
--no-backup "Do not take any backups before upgrading." # (Default is false)
--backup-dir "Directory to back up to." # (Default is "/tmp")
--install-path "Install path for MunkiReport." # (Default is current directory but strips "build"
--upgrade "Attempt to upgrade MunkiReport." # (Default is false)
--restore "Restore database from backup."
-v or --verbose "Enable verbose logging." # (Default is false)
--version "Version to upgrade to." # (Default is latest)
--no-composer "Don't run composer after upgrade." # (Default is false)
--no-migrations ="Don't run migrations after upgrade." # (Default is false)
Example output:
./mr_upgrade.py --upgrade
[2020-05-01 14:23:28] [INFO ] Current version: 5.3.6.4110
[2020-05-01 14:23:28] [INFO ] Latest version: 5.4.1
[2020-05-01 14:23:28] [INFO ] Install path: /path/to/munkireport/munkireport-wip/
[2020-05-01 14:23:28] [INFO ] Database type: sqlite
[2020-05-01 14:23:28] [INFO ] Installing version 5.4.1...
[2020-05-01 14:23:28] [INFO ] Backing up database to '/tmp/db_202005011423.sqlite.bak'...
[2020-05-01 14:23:28] [INFO ] Backing up files to '/tmp/munkireport/202005011423'...
[2020-05-01 14:23:32] [INFO ] Starting Git fetch...
[2020-05-01 14:23:34] [INFO ] Git fetch complete.
[2020-05-01 14:23:34] [INFO ] Switching to commit for version 5.4.1...
[2020-05-01 14:23:34] [INFO ] Git checkout complete.
[2020-05-01 14:23:34] [INFO ] Running composer...
[2020-05-01 14:24:49] [INFO ] Composer complete.
[2020-05-01 14:24:49] [INFO ] Running migrations...
[2020-05-01 14:24:50] [INFO ] Migrations complete.
[2020-05-01 14:24:50] [INFO ] Upgrade complete.
- General Upgrade Procedures
- How to Upgrade Versions
- Troubleshooting Upgrades
- Migrating sqlite to MySQL