Help · Your Mygration server
The mygration command
The commands for looking after a Mygration server from its command line, from status and logs to doctor, backups and the support bundle.
Last updated
The installer adds a mygration command to the server. Run it with sudo. Nothing it prints holds a password, key
or passphrase, so its output is safe to paste into a support request.
sudo mygration <command>
Run sudo mygration on its own to list the commands.
Everyday commands #
| Command | What it's for |
|---|---|
sudo mygration status |
The version (and a newer one, if there is), the panel's address, whether the panel answers, how many workers run, the free disk space and the last backup. |
sudo mygration logs |
The recent logs of everything. Name one part for just its logs: panel, worker, updater, backup, proxy or db. Add -f to keep following them; Ctrl+C stops. |
sudo mygration doctor |
Checks the server and says what's wrong and what to do: see doctor. |
sudo mygration start |
Starts Mygration, or one part of it (sudo mygration start backup). Use it after changing the settings file (.env), or if something stopped. |
sudo mygration workers |
Shows how many workers run on this server. sudo mygration workers 4 sets it (1 to 20), like Workers → Overview. |
For example, to follow the workers' logs while a pass runs:
sudo mygration logs worker -f
Updates and backups #
| Command | What it's for |
|---|---|
sudo mygration update |
Installs the newest version, as Update now does on System → Updates. Name a version to install that one. See Updating Mygration. |
sudo mygration update <older version> |
Rolls back: see Rolling back to an earlier version. |
sudo mygration backup |
Takes a backup now, as Back up now does. |
sudo mygration restore |
Lists the backups. With a file name, restores that one: see Restoring a backup. |
sudo mygration reencrypt-secrets |
Moves stored passwords saved before the server had its data-protection certificate onto it (--dry-run first counts them); --remove-old-keys then deletes the older keys. See Backups. |
Getting help #
| Command | What it's for |
|---|---|
sudo mygration support-bundle |
Collects the logs and settings for whoever helps you, with passwords, keys and tokens taken out. Use it when the panel won't open. See Collecting a support bundle. |
sudo mygration setup-code |
Shows the setup code again, for creating the first admin on a new install. |
doctor #
sudo mygration doctor is the first thing to run when something isn't right. It checks, in turn:
- Docker: it's running, and every part of Mygration is.
- Updates: updates are checked before they're installed.
- Name and HTTPS: the hostname points at this server, ports 80 and 443 listen, and the certificate is good and not about to run out.
- Registry: the license lets the server download new versions.
- Disk and memory: free space, and whether the workers fit in memory.
- Clock: the server's clock is in sync.
- Backups: the last backup worked and isn't too old.
Each line says ok, warn or fail. A warning or failure says what to do, often with the command to run. It ends with how many problems and warnings it found.
Tip
Keep the server's clock in sync (NTP). A clock that's far off can stop the license being accepted, and Microsoft
sign-ins fail with a wrong clock. If doctor says the clock isn't synchronised, run
sudo timedatectl set-ntp true.
The installer, again #
Running the installer again on an installed server is safe. It finds the install and offers:
Repair: puts this version's files back and starts everything. Your settings and data are kept.
sudo bash install.sh --repairUpgrade: takes a backup, then installs the newest version.
sudo bash install.sh --upgrade
Download install.sh again first if you no longer have it, as in Getting started.
Removing Mygration #
sudo mygration uninstall removes Mygration from the server after you type uninstall and the hostname to confirm.
It takes a last backup first, and keeps the backups and the settings file (whose passphrase opens them), so you can
reinstall and restore later. --purge removes those too, after a second confirmation: nothing can be restored after
that.