Moving thousands of historical posts, compressed package import and table import each handle what kind of data
When moving historical content, which type of data is suitable for compressed package import and table import? AnQiCMS supports batch import of ZIP compressed packages and Excel tables in two ways. The selection criteria are not the quantity but the data form: articles with text and pictures are taken through ZIP, and field-based directory content is taken through Excel. If the channel is judged incorrectly, the migration needs to be redone. This article explains the division method, packaging requirements, field alignment, and incremental duplicate check all at once.
Which type of data should go through which channel
First, look at what the content itself looks like, and then decide whether to use a compressed package or a table:
- A blog post with mixed graphics, a case page with full text formatting: priority to the completeness of the text and the citation of the pictures, go through ZIP compression package.
- Structured entries such as parameters, stores, and positions: fields are complete and rows are homologous, go through Excel spreadsheet.
- An existing catalog with only title and summary, the main text to be filled in later: use the document content import interface to check for duplicate titles and supplement the main text piece by piece.
- Needs to be moved in batches programmatically, can be resumed in the middle: use the document content import interface to check for duplicate titles, and complement the batch import.
| Data form | Suggestion channel | Focus point |
|---|---|---|
| Graphics mixed text article | ZIP compression package | Text and pictures together stored |
| Catalog-type field content | Excel spreadsheet | Column alignment of custom fields |
| Inventory of pending text to be corrected | Excel spreadsheet | Create entries first and then fill in the content |
| Programmatic batch migration | Import interface import/archive | Duplicate check by title, can continue running |
How to organize ZIP compressed package so as not to return to work
The preparation before packaging determines the amount of rework after import. The filename and article title should match, and images should use relative references within the package, do not leave the address of external site images; control the packaging within an accountable granularity, so that it is easy to locate which batch when a problem occurs. AnQiCMS's batch import supports ZIP compressed packages and Excel tables at the same time, the content imported after is first entered into a checkable state, a few articles are checked before a unified release, which is more secure than all at once going online.
Which fields in the Excel table should be aligned?
The essence of table import is that 'columns become fields', so the structure and custom content model should be matched at the table header stage:
- Column names should use the field口径 defined in the background, in addition to categories, tags, titles, and text, put the product difference parameters in custom fields.
- One article per row, only put field values in the cells, do not write formatting instructions.
- Delete empty columns to avoid misalignment of the entire column.
- After import, check and filter by field to ensure that mapping is correct.
Define the content model first, so that the import will not be scattered.
The custom content model determines the maintainability after import. Before migration, define the model: which fields are in this content, whether the fields participate in filtering and display. If the model is not defined, just pour in data, the fields can only be stuffed into the text, and there will be no place to start searching by parameters later. Once the fields are launched to carry content, try to change the type as little as possible, changing the field is almost equivalent to re-importing data.
The import interface performs incremental and duplicate checking.
It's hard to run through thousands of articles at once, and it should be able to continue after interruption. The document content import interface (/api/import/archive) supports querying whether an article already exists by title, and it should be checked before writing to continue without writing the same article twice. The high-frequency capability of interface calls is concentrated on content such as documents and classification tags, and specific parameters can be checked in the in-site interface document. After the migration is completed, check three things: whether the number of imported entries is consistent with the source list, whether the fields and images checked are complete, and whether the publication and collection promotion keep up, and then use the recycling bin and backup as a bottom line for accidental deletion.
Common questions
How should thousands of articles be imported in batches?In batches by verifiable granularity, continue after checking each batch, and can be resumed at any time in coordination with the duplicate check by title of the import interface.
What about the pictures in the table?Excel only carries field values, pictures cannot be placed in the table; graphical content should be sent through a ZIP compressed package, or create an entry first and then supplement the picture.
Can you roll back if the import is wrong?Deleting formal documents is moving them to the recycling bin, which can be restored; it is recommended to make a backup first before batch incorrect operations.