-
Notifications
You must be signed in to change notification settings - Fork 4
Importing from rustdesk api
One command migrates an existing lejianwen/rustdesk-api install: users,
devices, address books and audit history.
php artisan cortendesk:import-lejianwen /path/to/rustdeskapi.dbThe argument is the path to that project's SQLite database file.
php artisan cortendesk:import-lejianwen /path/to/rustdeskapi.db --dry-runRuns the entire import inside a transaction and rolls it back at the end. You get the full per-table report — imported, updated, skipped — with nothing written. Do this before the real run, every time.
| Option | Effect |
|---|---|
--dry-run |
Import inside a transaction, then roll back. Changes nothing. |
--wipe |
Truncate the target tables before importing. |
--wipedestroys existing CortenDesk data in the tables it touches. It is for re-running an import into a console that has nothing worth keeping. Take a database backup first — this is not undoable.
Users are imported with their password hashes intact where the source hash is bcrypt, so people sign in with the credentials they already had.
Any account whose source hash is not bcrypt cannot be carried over. Those are imported with a random password and listed at the end of the run. Those users need a password reset or a new password set by an administrator — they will not be able to sign in until then. Read that list; do not skip past it.
- Check the per-table counts against what you expected.
- Set passwords for any account named in the non-bcrypt list.
- Confirm device groups and ownership look right — see Users and access scoping.
- Point your clients' API Server at CortenDesk.
Devices re-register themselves on their next heartbeat, so presence fills in on its own within a minute or so of clients being repointed.