DOCUMENTATION
  • Welcome
  • Releases
    • 2025
      • Release v6.20.2 (2025-05-07)
      • Release v6.20.1 (2025-05-06)
      • Release v6.20.0 (2025-04-30)
      • Release v6.19.2 (2025-04-11)
      • Release v6.19.1 (2025-03-31)
      • Release v6.19.0 (2025-03-27)
      • Release v6.18.2 (2025-03-11)
      • Release v6.18.1 (2025-03-07)
      • Release v6.18.0 (2025-02-26)
      • Release v6.17.3 (2025-02-14)
      • Release v6.17.2 (2025-02-07)
      • Release v6.17.1 (2025-02-06)
      • Release v6.17.0 (2025-01-30)
    • 2024
      • Release v6.16.0 (2024-12-12)
      • Release v6.15.0 (2024-11-27)
      • Release v6.14.2 (2024-11-05)
      • Release v6.14.1 (2024-11-01)
      • Release v6.14.0 (2024-10-31)
      • Release v6.13.3 (2024-10-16)
      • Release v6.13.2 (2024-10-10)
      • Release v6.13.1 (2024-10-02)
      • Release v6.13.0 (2024-09-25)
      • Release v6.12.2 (2024-09-18)
      • Release v6.12.1 (2024-08-01)
      • Release v6.12.0 (2024-07-25)
      • Release v6.11.5 (2024-07-09)
      • Release v6.11.4 (2024-07-05)
      • Release v6.11.3 (2024-07-03)
      • Release v6.11.2 (2024-06-21)
      • Release v6.11.1 (2024-06-14)
      • Release v6.11.0 (2024-06-05)
      • Release v6.10.2 (2024-05-15)
      • Release v6.10.1 (2024-05-08)
      • Release v6.10.0 (2024-04-30)
      • Release v6.9.3 (2024-03-19)
      • Release v6.9.2 (2024-03-15)
      • Release v6.9.1 (2024-03-06)
      • Release v6.9.0 (2024-02-28)
      • Release v6.8.5 (2024-02-02)
      • Release v6.8.4 (2024-02-01)
      • Release v6.8.3 (2024-01-12)
      • Release v6.8.2 (2024-01-05)
    • 2023
      • Release v6.8.1 (2023-12-22)
      • Release v6.8.0 (2023-12-14)
      • Release v6.7.4 (2023-11-15)
      • Release v6.7.3 (2023-11-14)
      • Release v6.7.2 (2023-11-03)
      • Release v6.7.1 (2023-10-17)
      • Release v6.7.0 (2023-10-13)
      • Release v6.6.4 (2023-09-29)
      • Release v6.6.3 (2023-09-28)
      • Release 6.6.2 (2023-09-14)
      • Release v6.6.1 (2023-08-10)
      • Release v6.6.0 (2023-08-03)
      • Release v6.5.1 (2023-06-23)
      • Release v6.5.0 (2023-06-22)
      • Release v6.4.0 (2023-05-31)
      • Release v6.3.1 (2023-04-28)
      • Release v6.3.0 (2023-04-05)
      • Release v6.2.5 (2023-03-16)
      • Release v6.2.4 (2023-02-01)
      • Release v6.2.3 (2023-01-12)
      • Release v6.2.2 (2023-01-12)
      • Release v6.2.1 (2023-01-05)
    • 2022
      • fylr first Production Ready Release 🎉 (2022-12-22)
  • License
  • Help
    • FAQs
    • Tutorials
      • For Users
      • For Administrators
        • Exporting & Importing Hierarchical Lists
        • Regenerating preview images
        • Search Text in images or office files
      • For System Administrators
        • How to setup and use IIIF
        • External access: Sharing collections with anonymous users
    • Glossary
  • FOR USERS
    • Getting Started
    • Asset / Records Management
      • Creating Records
      • Editing Records
        • Input Fields
        • Group Editor
      • Deleting Records
    • Quick Access
      • Collections (& Presentations)
      • Saved Searches (& Lists)
    • Lists
    • Plugins
      • Plugin Overview
  • FOR ADMINISTRATORS
    • Permissions
      • User
      • Groups
      • Object Types
      • Pools
      • Tags & Workflows
      • Presets
    • Tools
      • CSV Importer
        • General Information
        • Options
        • Examples
          • All Data Types
          • Lists
          • Hierarchies
          • Files
      • JSON Importer
        • Step-by-Step Tutorial
          • Write Import Manifest
          • Create Basetype Payloads
          • Create Object Payloads
          • Collection Payloads
          • Optional: Update links between Objects
          • Start Import
      • Permissions Download & Upload
    • Base Configuration
      • General
      • Access
      • User Management
      • Languages
      • Email
      • Export & Deep Links
      • Workflow Webhooks
      • Publications
      • File Worker
        • Preview Configuration
        • Location Defaults
        • Custom .icc Color Profiles
      • Objectstore
      • Services
      • License Management
      • Development
      • Plugins
    • Plugin Manager
    • Location Manager
    • Messages
    • Events
    • Backup Manager
    • Additional Features
      • IIIF
      • Connector
      • Wordpress
      • Zooniverse
      • Protocols
        • OAI/PMH
  • FOR SYSTEM ADMINISTRATORS
    • Installation
      • Linux
        • multiple fylrs in one Linux
        • proxy and fylr
      • Windows
      • Kubernetes
    • Configuration
      • fylr.example.yml
      • fylr.default.yml
      • performance tuning
      • pre-load frontend config
      • Load Custom Plugins
      • HTTP and HTTPS
      • DNS Domains
    • Backups & Restore
    • Migration Tool
      • Create payloads (fylr backup)
      • Insert payloads (fylr restore)
      • Best Practice
      • Using the fylr inspect page
    • Integration
      • Authentication
      • Hotfolder
    • Symptom & Solution
      • Log messages that can be ignored
      • too many clients are connected
      • too many nested clauses
      • context canceled
      • ContainerConfig error
      • Purge objects
    • PostgreSQL versions
  • Tutorials
    • Project Workflow
    • Hotfolder & File System Connect
      • Preparations Before Usage
      • Setting Up An Upload Collection
      • Importing Files
    • PDF Creator
    • Extracting File Metadata Later On
    • Overlay Resource
    • Authentication
      • LDAP
      • SAML
    • Data Model Sync
    • Purge a fylr instance
    • typo3 plugin
    • Use fylr in Google docs via CI HUB
  • FOR DEVELOPERS
    • API
      • OAuth2
      • Endpoints
        • /api/collection
        • /api/config
        • /api/db_info
        • /api/db
        • /api/eas
        • /api/event
        • /api/export
        • /api/group
        • /api/l10n
        • /api/mask
        • /api/message
        • /api/oaipmh
        • /api/objects
        • /api/objecttype
        • /api/plugin
        • /api/pool
        • /api/publish
        • /api/right
        • /api/schema
        • /api/search
        • /api/settings
        • /api/suggest
        • /api/system
        • /api/tags
        • /api/transitions
        • /api/user
        • /api/webdav
        • /api/xmlmapping
        • /api/task
    • System Data Types
      • pool
      • file
      • user
      • group
      • pool
      • collection
      • message
      • publish
      • event
    • User Data Types
      • text, text_oneline
      • string
      • text_l10n, text_l10n_oneline
      • boolean
      • number
      • integer.2
      • double
      • date, datetime
      • daterange
      • geojson
    • Custom Data
    • Emails
    • Export
    • Exec server
    • File versions
    • WebDAV
    • Plugin
    • Collection Pin Code
    • easydb 5
    • Localization
    • Access private Repositories
Powered by GitBook
On this page
  • Parameters
  • --dir
  • --server
  • --login
  • --password
  • --purge
  • --continue
  • --size
  • --chunk
  • --chunk-size
  • --limit
  • --max-count
  • --max-parallel
  • --compression
  • --all-versions
  • --include
  • --include-events
  • --retry-max-count
  • --retry-sleep-between
  • --client-id
  • --client-secret
  • --client-token-url
  • --insecure
  • --verbose
  • --log-network
  • --log
  • --pretty
  • Migration of events: differences between easydb5 and fylr
  • Event Type API_CALL
  • Event Type API_PROGRESS
  • Event Type COLLECTION_OWNER_RIGHTS_ERROR
  • Event Type CUSTOM_TYPE_UPDATER_START
  • Event Type CUSTOM_TYPE_UPDATER_RESPONSE
  • Event Type CUSTOM_TYPE_UPDATER_RESPONSE_ERROR
  • Event Type CUSTOM_TYPE_UPDATER_RESPONSE_FAILED
  • Event Type SCHEMA_COMMIT
  • Event Type EXPORT_ASSET
  • Event Type EXPORT_OBJECT
  • Event Type ASSET_EXPORT_TRANSPORT_DOWNLOAD
  • Event Type EXPORT_STOPPED
  • Event Type DOWNLOAD_EXPORT
  • Event Type ASSET_DOWNLOAD
  • Event Type ASSET_EXPORT_DOWNLOAD
  • Event Type SUGGEST_INDEX_DONE
  • Event Type SUGGEST_INDEX_FAILED
  • Event Type JANITOR_SESSION_PURGE
  • Event Type MAPPING_DELETE
  • Event Type MAPPING_INSERT
  • Event Type MAPPING_UPDATE
  • Event Type RESOURCE_NOT_AVAILABLE
  • Event Type SERVER_START
  • Event Type SERVER_SHUTDOWN
  • Event Type SESSION_INVALID
  • Event Type SUGGEST_INDEX_DONE
  • Event Type SUGGEST_INDEX_FAILED
  • Event Type USER_CREATED
  • Event Type USER_LOGIN
  • Event Type USER_LOGOUT
  • Event Type LOGIN_FAILED
  • Event Type USER_ACCEPTED_MESSAGE
  • Event Type WEBHOOK_OK
  1. FOR SYSTEM ADMINISTRATORS
  2. Migration Tool

Create payloads (fylr backup)

This page describes the process of creating a local backup of JSON payloads from a source instance

PreviousMigration ToolNextInsert payloads (fylr restore)

Last updated 1 month ago

The fylr backup command performs GET requests to the API of the source instance, until all relevant base types and records are retrieved and stored in local files.

A basic backup command looks like this:

fylr backup \
  --server '<source-url>/api/v1/' \
  --login 'root' \
  --password '<cleartext>' \
  --dir '<instance folder>/' \
  --compression 9 \
  --purge

--server, --login and --password refer to the source server.

--purge deletes a backup in --dir in case there is already one. All existing files in this directory are deleted!

The backup over the API only stores the data in local files. The files are only referenced by URLs. Only during restoring, the files are loaded from the source instance. Until the restore is finished, the source instance still needs to be reachable.

Not all events will be migrated from easydb5 to fylr, because they have no purpose in fylr. Also, some events need to be changed.

For a complete overview, see

Parameters

This is a complete overview of the command line parameters (run fylr backup -h):

Usage: fylr backup [flags]

Backup ez5 or FYLR via API

Flags:

-h, --help                      Show context-sensitive help.
-v, --verbose                   Set to true, to show additional info.
-n, --log-network               Set to true, to log all network traffic.
    --server=STRING             Source url (overwrites URL of source instance from config)
-l, --login=STRING              If --server is set, use as login. Make sure to use the system root user to connect if used together with --purge.
-p, --password=STRING           If --server is set, use as password
    --client-id=""              If --server is set, use as OAUTH2 client ID
    --client-secret=""          If --server is set, use as OAUTH2 client secret
    --client-token-url=""       If --server is set, use as OAUTH2 token url
    --insecure                  Set to true, to not verify the server's certificate chain and host name
    --log=STRING                Set output to logfile
    --purge                     For backup: set to true, to purge the target directory. For restore: set to true, to purge the target and copy the datamodel. The current password of the user used for the login will be set for the system root user.
    --continue                  Set to true, to continue.
    --verify                    If set, verify payloads of an existing backup (same what --continue does at the beginning).
    --chunk-size=100            chunk size for fetching/pushing data.
    --include-events=""         Comma separated list of event types. Use "-" to skip backup/restoring of events. Empty string will backup/restore all known event types.
    --max-parallel=1            Maximum numbers of parallel workers. 0 uses the number of available CPUs. This creates more load on the source / target system. Defaults to "1" (only one parallel process).
-d, --dir=STRING                Target directory.
    --compression=0             0: no compression, 1: speed, 9: best.
    --all-versions              Set to true, to request all versions of an object.
    --include=""                Filter regexp to include objecttypes.
    --maximum-count=0           Limit records. Set to 0 for unlimited.
    --retry-max-count=10        Number of retries for failed requests with network problems.
    --retry-sleep-between=30    Wait time in seconds between retries for failed requests.
    --pretty                    Output pretty JSON.

--dir

Target folder for the backup files. If it does not exist, it will be created. If it exists, and --purge is used, an existing folder is deleted and created new.

  • this parameter is mandatory!

  • type: string

--server

API Url of the source instance. The Url must include the API base endpoint, for fylr this is <source url>/api/v1.

  • this parameter is mandatory!

  • type: string

--login

Username of the user in the source instance. It should be a user with root rights or sufficient read rights.

  • this parameter is mandatory!

  • type: string

--password

Password of the user in the source instance.

  • this parameter is mandatory!

  • type: string

--purge

Defines the mode of the backup (purge or continue).

If this is true, the complete backup starts from the beginning, and an existing backup folder with the same name is purged.

The parameters --purge and --continue are mutually exclusive. Not both can be true.

If the target folder already exists, this parameter (or --continue) must be set, otherwise the backup will fail.

  • type: bool

  • default: false

--continue

Defines the mode of the backup (purge or continue).

If this is true, the backup continues from the last point in the manifest.json file, if a previous backup run was interrupted.

The parameters --purge and --continue are mutually exclusive. Not both can be true.

If the target folder already exists, this parameter (or --purge) must be set, otherwise the backup will fail.

  • type: bool

  • default: false

--size

Deprecated! This parameter is removed in fylr in version v6.18.0.

The target size for objects in payloads. The effective size of the generated payloads is limited by --chunk.

  • type: int

  • minimum: 1

  • maximum: 1000

  • default: 100

--chunk

Deprecated! This parameter is removed in fylr in version v6.18.0.

The requested size for objects from the source instance. Can be used to control the size of the responses. It can be lowered if the requests cause timeouts or network problems.

This parameter was renamed to --chunk-size

  • type: int

  • minimum: 1

  • maximum: 1000

  • default: 100

--chunk-size

This parameter is available in fylr from version v6.18.0.

The requested size for objects from the source instance. Can be used to control the size of the responses. It can be lowered if the requests cause timeouts or network problems.

  • type: int

  • minimum: 1

  • maximum: 1000

  • default: 100

--limit

Deprecated! This parameter is removed in fylr in version v6.18.0.

Set this to a number bigger than 0 to limit the number of objects of each objecttype. This can be used to test or debug, and can be combined with --include to only backup a small sample of the source instance.

This parameter was renamed to --max-count

  • type: int

  • minimum: 0

  • default: 0

--max-count

This parameter is available in fylr from version v6.18.0.

Set this to a number bigger than 0 to limit the number of objects of each objecttype. This can be used to test or debug, and can be combined with --include to only backup a small sample of the source instance.

  • type: int

  • minimum: 0

  • default: 0

--max-parallel

This parameter is available in fylr from version v6.18.0.

Maximum numbers of parallel workers.

0 uses the number of available CPUs.

Defaults to 1 (only one parallel process).

This creates more load on the source system.

  • type: int

  • minimum: 0

  • default: 1

--compression

GZIP compression level.

If 0 is selected, there is no compression and the payloads are stored as .json files. If a value bigger than 0 is selected, the payloads are stored as compressed .json.gz files.

  • type: int

  • minimum: 0

  • maximum: 9

  • default: 0

--all-versions

Set to true so that all history versions of the records are requested.

Not to be confused with asset versions (see parameters for fylr restore)!

  • type: bool

  • default: false

--include

If this is a valid non empty regex string, only objecttypes are backupped where the internal objecttype name matches the regex.

  • type: string

--include-events

Comma separated list of event types.

Use --include-events=- to skip backup of events.

If this parameter is unset, all events are backupped

Specific event types, which are irrelevant for the migration, are never in the backup, even if they are specifically requested.

For now, this includes OBJECT_INDEX, SESSION_INVALID, FRONTEND_ERROR and COLLECTION_OWNER_RIGHTS_ERROR, but this might be extended in the future.

  • type: string

  • default: ""

--retry-max-count

If a request fails with one of the following HTTP status codes that indicate network problems, the request is repeated for a maximum number of times: 502: Bad Gateway, 503: Service Unavailable, 504: Gateway Timeout

  • type: int

  • default: 10

--retry-sleep-between

Defines the waiting time in seconds between repeated failed requests.

  • type: int

  • default: 30

--client-id

If the source instance uses OAuth2 for user authentication, this is the configured Client ID.

  • type: string

--client-secret

If the source instance uses OAuth2 for user authentication, this is the configured Client Secret. Can be kept empty if the instance is public.

  • type: string

--client-token-url

If the source instance uses OAuth2 for user authentication, this is the OAuth2 callback endpoint of the instance. For fylr this is <source url>/api/oauth2/token.

  • type: string

--insecure

Set to true to skip the certificate check for the connection to the source instance.

Only use this option if you can trust the remote server!

  • type: bool

  • default: false

--verbose

Set to true to log debugging info.

  • type: bool

  • default: false

--log-network

Set to true to log the requests and responses.

  • type: bool

  • default: false

--log

If this is a valid file path, the log output is written to this file. If this is empty (default), the log output is written to stdout instead.

  • type: string

--pretty

This parameter is available in fylr from version v6.17.0.

Set to true to save the data in a prettified JSON.

  • type: bool

  • default: false

Migration of events: differences between easydb5 and fylr

Events of the following types are either not migrated at all, or they will automatically be changed to be imported into fylr.

All event types which are not mentioned here, will be migrated without any type changes.

The event info block will be migrated without any changes. IDs which relate to objects, files, etc., and which are not part of the event info block, are automatically replaced during the restore process.

Event Type API_CALL

Events with this type can not be migrated to fylr at all!

Event Type API_PROGRESS

Events with this type can not be migrated to fylr at all!

Event Type COLLECTION_OWNER_RIGHTS_ERROR

Events with this type can not be migrated to fylr at all!

Event Type CUSTOM_TYPE_UPDATER_START

The event type will be changed from CUSTOM_TYPE_UPDATER_START to CUSTOM_DATA_TYPE_UPDATER in fylr.

Event Type CUSTOM_TYPE_UPDATER_RESPONSE

The event type will be changed from CUSTOM_TYPE_UPDATER_RESPONSE to CUSTOM_DATA_TYPE_UPDATER in fylr.

Event Type CUSTOM_TYPE_UPDATER_RESPONSE_ERROR

The event type will be changed from CUSTOM_TYPE_UPDATER_RESPONSE_ERROR to CUSTOM_DATA_TYPE_UPDATER_ERROR in fylr.

Event Type CUSTOM_TYPE_UPDATER_RESPONSE_FAILED

The event type will be changed from CUSTOM_TYPE_UPDATER_RESPONSE_FAILED to CUSTOM_DATA_TYPE_UPDATER_ERROR in fylr.

Event Type SCHEMA_COMMIT

The event type will be changed from SCHEMA_COMMIT to DATAMODEL_COMMIT in fylr.

Event Type EXPORT_ASSET

Events with this type can not be migrated to fylr at all!

Event Type EXPORT_OBJECT

Events with this type can not be migrated to fylr at all!

Event Type ASSET_EXPORT_TRANSPORT_DOWNLOAD

The event type will be changed from ASSET_EXPORT_TRANSPORT_DOWNLOAD to EXPORT_TRANSPORT in fylr.

Event Type EXPORT_STOPPED

Events with this type can not be migrated to fylr at all!

Event Type DOWNLOAD_EXPORT

Events with this type can not be migrated to fylr at all!

Event Type ASSET_DOWNLOAD

The event type will be changed from ASSET_DOWNLOAD to FILE_DOWNLOAD in fylr.

The basetype of this event will be changed from asset to file in fylr.

Event Type ASSET_EXPORT_DOWNLOAD

The event type will be changed from ASSET_EXPORT_DOWNLOAD to FILE_DOWNLOAD in fylr.

The basetype of this event will be changed from asset to file in fylr.

Event Type SUGGEST_INDEX_DONE

Events with this type can not be migrated to fylr at all!

Event Type SUGGEST_INDEX_FAILED

Events with this type can not be migrated to fylr at all!

Event Type JANITOR_SESSION_PURGE

The event type will be changed from JANITOR_SESSION_PURGE to JANITOR in fylr.

Event Type MAPPING_DELETE

The basetype of this event will be set to mapping in fylr. In easydb5, there was no basetype for this event type.

Event Type MAPPING_INSERT

The basetype of this event will be set to mapping in fylr. In easydb5, there was no basetype for this event type.

Event Type MAPPING_UPDATE

The basetype of this event will be set to mapping in fylr. In easydb5, there was no basetype for this event type.

Event Type RESOURCE_NOT_AVAILABLE

Events with this type can not be migrated to fylr at all!

Event Type SERVER_START

Events with this type can not be migrated to fylr at all!

Event Type SERVER_SHUTDOWN

Events with this type can not be migrated to fylr at all!

Event Type SESSION_INVALID

Events with this type can not be migrated to fylr at all!

Event Type SUGGEST_INDEX_DONE

Events with this type can not be migrated to fylr at all!

Event Type SUGGEST_INDEX_FAILED

Events with this type can not be migrated to fylr at all!

Event Type USER_CREATED

The event type will be changed from USER_CREATED to USER_INSERT in fylr.

The basetype of this event will be set to user in fylr. In easydb5, there was no basetype for this event type.

Event Type USER_LOGIN

The basetype of this event will be set to user in fylr. In easydb5, there was no basetype for this event type.

Event Type USER_LOGOUT

The basetype of this event will be set to user in fylr. In easydb5, there was no basetype for this event type.

Event Type LOGIN_FAILED

Events with this type can not be migrated to fylr at all!

Event Type USER_ACCEPTED_MESSAGE

Events with this type can not be migrated to fylr at all!

Event Type WEBHOOK_OK

The event type will be changed from WEBHOOK_OK to WEBHOOK in fylr.

below