Skip to main content

Smallsite Design

Online management help

19. Import

The contents of a Smallsite Design site can be archived, and from an archive, a full site or some elements of it can be imported.

Archivesβ–³

Archives of the site are created periodically and during some operations, but are automatically deleted according to a calendar-based schedule.

Archives are a complete .zip file of all the files in a site. They can be downloaded, uploaded, used to completely replace a site (overwrite) or selectively import elements from.

Archives are created:

  1. a.When the master manager logs in, if it has been more than 12 hours since the last login archive (automatic).
  2. b.Overwriting the current site from an archive file (manual).
  3. c.Before importing elements from an archive (manual).
  4. d.Explicitly invoking an archive (manual).

There is no difference between automatic and manual archive internally, but it is for reference when determining if an archive was generated during an operation on the Import page (manual) or routine logins (automatic).

Archives are deleted to leave only the last in each of:

  1. a.Current day.
  2. b.Previous day.
  3. c.Current month.
  4. d.Previous month.
  5. e.Current year.
  6. f.Previous year.

Each time period excludes that time already covered by later time periods, so Current month does not use archives from Current day or Previous day to determine its last archive. For example, if the current day is the 16th of the month, then Current month does not consider any archives after the end of the 14th.

Archive files have a name format of dt.sid.t.algo.hash.zip, where:

  1. a.dt: date and time saved as yyyy-mm-dd-hh-mm-ss using UTC as a time reference.
  2. b.sid: Site ID, as specified in the Values section of the Settings page.
  3. c.t: type of archive, where a is automatic and m is manual.
  4. d.algo: algorithm used to generate the hash .
  5. e.hash: hash of the file contents in hex characters.
  6. f.zip: extension for archive files.

Importingβ–³

While overwriting a site from an archive is straightforward, importing elements is dependent upon locales and ID conflicts.

The master locale of a site can only have its region changed, so unless the master locale in the archive to be imported from has the same master locale or only differs in region, it cannot be imported. If still eligible, for any other locale in the archive that cannot be renamed to match one in the site, any elements with text for that locale will have that text removed before importing. The Files column, when expanded, of the archive's row in the Archive list will show what will happen to each locale.

The results for several import scenarios are:
#ArchiveSiteResultImport
aen-001 #
ar-001 ✘
en-001 #
de-de
Masters match. ar-001 stripped. No de-de in importsYes
ben-us #
en-ca
en-001 #
en-gg
Master renamed to en-001. en-ca renamed to en-gg. No en conflicts as the masters evaluated first, then excluded from following comparisonsYes
cen-ca #
en-001 ✘
en-001en-ca renamed to en-001. en-001 stripped because masters already handled, so nothing to rename toYes
den-001 #
en-ca ✘
en-us
en-001 #
en-us
Masters match. en-us match. en-ca stripped. No conflict as exact matches evaluated next after masters, then excluded from following comparisonsYes
een-001 #
en-us ?
en-ca ?
en-001 #
en-au ?
Masters match. Conflict because two source locales could be renamed to match the non-master site localeNo
fen-001 #
en-us ?
en-001 #
en-ca ?
en-au ?
Masters match. Conflict because the non-master source locale could be renamed to either of the site onesNo

In today's internet, people have been getting used to sites using the same language having different spellings and expressions, especially given the dominance of US English content over the early times of the internet. Typically now people will write how they are used to, and let readers accept the spelling and other differences.

Having two or more locales with the same language (and script) is usually to cater for audiences who really want to retain the different idioms and expressions they are used to, and that is why renaming regions is not really a solution. Yes, it may get around the technical issues of importing, but anything imported with renamed regions would have to be carefully checked that all content is consistent with the new locales.

Some elements in the archive might have IDs or internal references that are the same as elements in the site. The ID and Created columns of the Import list will show what their new values will be. Any elements to be imported that reference other imported elements with such changes, will have those references updated as well.

Any elements that cannot be imported will need to be recreated in the site and the text individually copied from those elements.

Archive listβ–³

The archive list shows the available archives and the operations that can be done on each.

The columns for the archive list are:
#NameDescription
1IDArchive identifier as its date-time of creation. Currently for the site itself
2SiteSite identifier as specified in the Site ID field of the Values section of the Settings page
3ModeLoaded for the current site
Automatic if created at master manager login
Manual if actioned on this page
4FilesList of the numbers of all elements in the site or an archive, including any changes required to locales for import. Use to identify possible import issues
5ActionsActions available for the current site or an archive, followed by any errors that prevent importing
The available actions for the current site or an archive are:
ActionDescription
ArchiveCreate an archive of the current site
UploadUpload an archive file to the site
DeleteDelete the archive
OverwriteImport the whole archive to replace the current site
ImportImport part of the archive. Only shown if no errors that would prevent importation are found
DownloadDownload the archive from the site

When an archive has been selected for import, a list of any changes to locales required during import are shown. Clicking the Deselect button in the navigation bar re-presents the Select import item drill-down list.

Select import itemβ–³

An item in the archive has to be selected.

Drill down to select the one item to be imported. 𝝙 indicates an element that will be renamed to prevent duplicates.

As a result of selection, the result or next action required, by item type, is:

  1. a.Subsite – modify which descendants are included.
  2. b.Category – modify which descendants are included.
  3. c.Article (in category) – modify which descendants are included.
  4. d.Article (in templates) – select the new owner.
  5. e.File - imported immediately.

Modify selectionβ–³

Some descendants of the selected item can be excluded from the import.

Click on which items to exclude. Click again to re-include. Files listed under subsites, categories or articles are a link to their entry under Files, which can be clicked on to exclude them.

As a result of clicking the Import button at the bottom of the Import list, the result or next action required, by item type, is:

  1. a.Subsite – imported immediately.
  2. b.Category – select the new owner.
  3. c.Article (in category) – select the new owner.
  4. d.Article (in templates) – select the new owner.

Select ownerβ–³

For a selected article or category, the new owner must be selected.

For a selected article or category, the new host in the current site must be clicked on. Drill down to find it. After selection, another item can be selected from the archive for import.

Import listβ–³

All the items to be imported are listed, including any changes to prevent duplicate identifiers.

The columns for the list of imported items are:
#NameDescription
1TypeThe type of item being imported
2IDItem identifier, if applicable. If to be renamed, the new ID is underneath
3CreatedUnique internal item identifier as its creation date. If to be changed, the new identifier is underneath
4CommentsText for files, else blank

External sites open in a new tab or window. Visit them at your own risk.
This site doesn't store cookies or other files on your device, but external sites might.
Manage         Help   Powered by: Smallsite Design ©Patanjali Sokaris         art-a  3  0  2021-11-18-03-28-37