Migrate pictures¶
Use the Picture Migration wizard to move all pictures of this company from one storage source to the other.
When to use this
- You switch from Tenant Media to External File Storage, or back.
- Some pictures are still in the other storage source, for example because a new kind of record was added after the company was migrated.
1. Prerequisites¶
- You have the Media Storage Mgt. permission set.
- The company manages its own pictures (it does not use a media source company).
- For External File Storage: a file account is set up. See Set up external storage. The wizard can also help you set it up.
- For a background run: the job queue is running in the environment.
2. Steps¶
2.1. Open the wizard¶
- Search for Media Bridge Setup and open the page.
- Choose Migrate Medias....
If a migration is still running or waiting, Media Bridge asks you first:
- A background job is scheduled or running: you can open the job queue entry to follow it, restart it or delete it. The wizard does not open.
- A run is still marked as in progress: you can cancel it and start a new migration. If the session of that run is still active, the default answer is No, because it may really still be running. See Cancel a stuck run.
2.2. Step 1: Storage & Pictures¶
| Field | What to do |
|---|---|
| Connection Status | Shows the result of the last connection test. Choose Test Connection to test again. |
| From → Storage Source | The storage that holds the pictures now. |
| To → Storage Source | The storage to move them to. |
| File Account | For the External File Storage side: the account used. Use the assist button to choose another account; it is assigned to every Media Bridge file scenario. |
| Folder | For the External File Storage side: the root folder. Use the assist button to browse. |
| Pictures | One row per kind of record, with the number of pictures in From and already in To. |
Media Bridge proposes the direction for you. When some pictures exist only outside the current storage source, it proposes to move those into the current source. The note below the table explains what will happen. You can always change From and To.
Choose Next. When External File Storage is involved and no file account is set up, Media Bridge offers to open File Accounts.
2.3. Step 2: Options¶
| Option | Default | Effect |
|---|---|---|
| Overwrite Existing | Off | When off, a record that already has a picture in the target is skipped. When on, the target picture is replaced. |
| Delete Source After Transfer | Off | When on, the picture is removed from the source after a successful transfer. |
| Dry Run | Off | Counts what would happen, without changing anything. No run is recorded. |
| Run in Background | On | Schedules the migration as a job queue entry. Ignored for a dry run. |
Keep the source during a first migration
With Delete Source After Transfer off, the Tenant Media copy stays in the database. List pages that show item thumbnails keep working, and you can move back without losing anything. Clear the source later, once you are satisfied.
2.4. Step 3: Ready to Run¶
Check the summary, then choose Run.
2.5. Step 4: Result¶
- Foreground run: the wizard shows Total, Transferred, Skipped and Failed, and Storage Source Switched when the run had no failures.
- Background run: the wizard shows Migration job scheduled. The
job queue entry is called
FRW Picture Migration.
Choose Finish.
3. What happens during the run¶
- Media Bridge records a new run on Media Migration Runs, with status In Progress.
- For every item, item variant and employee with a picture in From:
- if it already has a picture in To and Overwrite Existing is off, the record is Skipped;
- otherwise the picture is read from From and written to To (Transferred), or the record is marked Failed with the reason;
- with Delete Source After Transfer, the source copy is removed. If that fails, the record is marked Source Delete Failed: the picture did reach the target.
- Progress is saved every 500 records.
- At the end, the run gets status Completed (no failed records; the storage source switches to To) or Completed with Errors (the storage source stays the same).
- One summary entry is written to the Business Central Activity Log, with up to 100 failed records listed.
4. Verify¶
- Media Migration Runs shows the run as Completed.
- Media Bridge Setup shows the new Media Storage Source.
- Open a few items: their pictures still show.
5. Common signals you may need this procedure¶
The source and target storage sources must be different.
From and To are the same. Change one of them.
A migration is already in progress.
Another run is marked In Progress. See Cancel a stuck run.
A Media migration is already scheduled or running as a background job (status: ...).
A job queue entry for a migration exists. Let it finish, or restart or delete it on Job Queue Entries.
Media migration is not available when this company uses a media source company.
Run the migration in the source company. See Multi-Company.
6. When to contact The Framework¶
- The run finishes with many failed records, and the reasons in the migration log are unclear.
- The background job keeps failing with an error you don't understand.