execute db migrate
Use this command to migrate or clean up legacy table data (up to seven days of data per execution) when upgrading FortiNDR to version 7.6.4 GA. If you want to browse historical NDR log and Malware log data after upgrading from 7.6.3 to 7.6.4, you can use this command to migrate the legacy data.
After migration is complete, you can use the same command with the cleanup option to remove the legacy table data.
If the legacy data is not cleaned up, it remains in the database until it expires based on the configured TTL (264 days by default).
Syntax
execute db migrate [{<from_date_str> <to_date_str> | cleanup}]
| Variable | Description |
|---|---|
|
<from_date_str> |
The system date in mm/dd/yyyy format. |
|
<from_date_str> |
The system date in mm/dd/yyyy format. |
|
cleanup |
Clean up legacy data after the DB migration to free disk space. Once the cleanup operation is performed, the old data can no longer be migrated.
|
Example 1:
execute db migrate
The CLI displays the following:
Default time range: last 7 days (2026-02-25 00:00:00 to 2026-03-03 23:59:59)
Disk usage precheck: 2.58% (threshold 80%) ... PASS
This operation will start data migration and it could take several hours.
Do you want to continue? (y/n)
After you enter y (yes), data migration will start.
Migration started.
ML data prepare......done.
Data from 2026-02-25 00:00:00 to 2026-02-26 00:00:00
File data part1......done.
File data part2......done.
File data part3......done.
NDR data......done.
ML data......done.
Data from 2026-02-26 00:00:00 to 2026-02-27 00:00:00
File data part1......done.
File data part2......done.
File data part3......done.
NDR data......done.
ML data......done.
Data from 2026-02-27 00:00:00 to 2026-02-28 00:00:00
File data part1......done.
File data part2......done.
File data part3......done.
NDR data......done.
ML data......done.
Data from 2026-02-28 00:00:00 to 2026-03-01 00:00:00
File data part1......done.
File data part2......done.
File data part3......done.
NDR data......done.
ML data......done.
Data from 2026-03-01 00:00:00 to 2026-03-02 00:00:00
File data part1......done.
File data part2......done.
File data part3......done.
NDR data......done.
ML data......done.
Data from 2026-03-02 00:00:00 to 2026-03-03 00:00:00
File data part1......done.
File data part2......done.
File data part3......done.
NDR data......done.
ML data......done.
Data from 2026-03-03 00:00:00 to 2026-03-03 23:59:59
File data part1......done.
File data part2......done.
File data part3......done.
NDR data......done.
ML data......done.
Migration done.
Example 2:
execute db migrate cleanup
The CLI displays the following:
WARNING: This operation will permanently delete legacy table data and cannot be undone.
Do you want to continue? (y/n)
After you enter y (yes), legacy data will be deleted.