Usage Omeka S module

Downloading from a Link

The From a link box on the Upload Backup page has this server download a backup archive itself, from any web address that serves the ZIP without signing in. Use it to move a site: paste a download link from the old site's Backups page, or a link to an archive that is already somewhere on the web, for example in cloud storage. The archive goes straight to the new server, however large it is, and you never download it to your own computer or wait for an upload.

Downloading an archive

  1. Go to Admin > Backup and click Upload Backup (/admin/backup/upload).
  2. Paste the link under From a link > Link to the archive.
  3. Click Download.

You are returned to the Backups page with a message naming the archive and the background job doing the work. The archive is listed straight away:

Status Meaning
downloading The archive is arriving. The Size column shows how much has arrived so far; refresh the page to follow it.
in_progress The archive has arrived and every file in it is being checked against the CRC-32 checksums stored in the ZIP.
complete The archive is whole and can be restored like any other.
failed The download or the check failed. The job's log, linked from the message and listed under Admin > Jobs, says why.

The archive is named after the file in the link (site-backup.zip for https://example.org/files/site-backup.zip; a download link from another Omeka S site ends in the archive's own name), with any character other than letters, digits, dot, underscore and hyphen replaced by a hyphen. A link that does not end in a .zip file name is named after its server, such as backup-from-example.org.zip. If that name is taken, a timestamp and random token are added.

What makes a good link

The link must download the ZIP itself when opened in a private browser window, without signing in. Try it that way first if you are unsure. Links that open a web page instead (a cloud storage preview, a sign-in page, a share page with a Download button) fail with The link leads to a web page, not to a ZIP file: look for the service's direct download link.

To move a site from another Omeka S site, click Get download link next to the archive on that site's Backups page and paste the link it gives you. See Download Links. Its Download button does not work as a link: it is only for signed-in administrators of that site, so the other server answers with its sign-in page.

An expired or revoked download link fails with There is nothing at the link (HTTP 404): make a new one. A backup made by Omeka Classic's Backup plugin fails with is an Omeka Classic backup: only an Omeka Classic site can restore it.

Only http:// and https:// links are accepted. Use https:// where you can: the archive holds the whole site, including password hashes and API keys.

Large archives and dropped connections

The download runs in the background, so no upload limit applies and closing the browser does not stop it. While it runs:

  • If the connection drops or the other server answers with an error, the download is tried again, up to five times in a row without progress, waiting a little longer each time. When the other server supports ranges, as most web servers and cloud storage do, it carries on where it stopped instead of starting over.
  • A connection that brings less than 1 KB per second for two minutes is treated as dropped.
  • When the other server announces the archive's size, the download stops at once if the backup directory does not have that much free space plus 100 MB.

The archive arrives as a hidden file named .<filename>.part in the backup directory and is moved into place only once it is whole and contains metadata.json. A link to a ZIP that is not an Omeka S backup fails with missing metadata.json and leaves nothing behind.

Stopping a download

Click Delete on a downloading row, or Attempt stop on its job under Admin > Jobs. The download stops within a few seconds and its partial file is removed. A row stopped from the Jobs page stays in the list as failed; delete it when you no longer need it.

Links to private networks

To keep a link from making the server reach services that are not public (the server itself, its local network, a cloud provider's metadata service), links must point at a public internet address. Links to addresses such as 127.0.0.1, 192.168.x.x or 10.x.x.x, or to a name that resolves to one, are refused with is a private network address. Every redirect is checked the same way.

To move a site between servers on the same private network, allow private addresses in config/local.config.php. See Configuration. From the command line, fetch --allow-private does the same for one download.

From the command line

On a server with shell access, fetch downloads and checks an archive without a background job, printing its progress:

php modules/Backup/bin/backup.php fetch https://storage.example.org/site-backup.zip

See CLI Commands.

Requirements

Downloading from a link needs PHP's curl extension, which most PHP installations include. Without it the From a link box says so, and you can upload the archive or copy it into the backup directory instead. See Adding Archives by FTP.

Log in for Support