Export all objects of a specific tenant. For every object a folder is created, containing the object's metadata in JSON format and its content file if available.
This command may be useful, e.g., if a customer's contract corresponding to a specific tenant ends. All data stored for this tenant can be exported for further usage in other systems. The export includes the metadata of all objects and the corresponding binary content files. Every object is exported separately. Therefore, a folder structure is created using the tenant name as root level. Each object is created as a folder named according to its system:objectId
, which contains a metadata.json
file and the binary content file if available. To prevent performance issues when browsing those exported items with file explorers, it is possible to specify the maximum number of items within a folder. Considering this limitation, a nesting strategy is used to add more hierarchical (physical) folder levels and reduce the number of elements per folder.
While running the task, the process progress is continuously displayed including an estimated completion time.
Parameter | Argument Type | Description | Required | Default | Example |
---|
--tenant <arg> | string | Tenant for which all objects are to be exported. | yes | - | --tenant default |
--fetch-size <arg> | int | Fetch size for database requests. Maximum number of objects included in each database request. The value must be at least 1 and not bigger than 100000. | no | 1000 | --fetch-size 500 |
--folder-size <arg> | int | Maximum number of items per folder to prevent performance issues when browsing folders. The value must be at least 1 and not bigger than 10000. | no | 5000 | --folder-size 50 |
--target-directory <arg> | string | Target directory for exported items. | no | . | --target-directory C:\Users\myusername\ymexports |
--start-date <arg> | string | Start date. Every item that was created since this date will be exported (e.g., 2018-03-13). If not specified, the first creation date will be used. | no | firstobjectcreation | --start-date 2021-09-01 |
--end-date <arg> | string | End date. Every item that was created until this date will be exported (e.g. 2021-03-13). If not specified, the end date is today. | no | today | --end-date 2021-09-01 |
Example
In the following example, all objects that were stored since 2021-09-01
by any user of tenant default
will be exported. Additionally, only 50 items should be stored in each folder, so a nesting strategy is used.
Lt. Commander>maintain-export --tenant default --start-date 2021-09-01 --folder-size 50
Running export job for tenant 'default' from '2021-09-01T00:00:00.000+02:00' to '2021-09-29T00:00:00.000+02:00'
The result is in a folder structure, similar to the example structure below. Each folder contains the metadata.json
and the binary data (if available).
\---default
+---0
| +---004f0124-51cb-4293-8db8-5f7fa31d3a9c
| +---01b7e555-aa1f-43e4-a27d-901463f26dc3
| +---0482f25b-4946-4b50-8663-993ecfb80b55
| +---04b4ef67-b72d-44c5-bdae-928c21839f1c
| +---051521da-eb3e-479a-89a0-be9c8e26569c
| +---05a70b84-8ce7-4c2e-ac32-af480bd120ce
| +---082d3913-83ca-4d2b-b8ae-53f3086ad6c1
| \---0d98f3b2-718a-4808-b185-c1e4e28ce732
+---1
| +---16a06147-ca6e-4c52-8ce9-8fef91a7f3ec
| \---17cb45fa-d8b8-4df1-b761-87711e615005
+---2
| +---2665cd04-dbb1-4221-8877-53df9ae4d37f
| +---29a6af2f-7265-43c3-94fa-e249a028768f
| +---2ed11958-88ea-4800-82d9-3529a12e31de
| \---2f1d183e-9e93-487b-9a74-98ecd2331b75
+---3
| +---3267cacc-6408-4a3f-909e-3796e43f1b84
| +---3759d0b9-0f8f-4cf8-8bc2-394d7e381e3c
| +---394be944-6237-4090-a4ea-2fc9d48ddde8
| +---3a19a763-9e1a-4264-9e71-c8ae02bad8e7
| +---3dd159bf-90dd-472a-aa84-dcaf6c828e83
| \---3f55c478-a084-4bc1-aa6a-63327b5cebb6
+---4
| +---408bcfeb-48e9-4350-bae5-9378443aef34
| +---4348a318-abea-4d84-a416-f82f8380ef15
| +---43eb7e68-16f1-4a7e-a77b-fdcf7c846315
| +---447b11b5-dd87-4582-9a47-32fce361da88
| \---4a7dcced-2ed8-4041-bf6d-fd5b5c96e959
+---5
| +---546db2d9-8401-45ff-ab10-b002ac440c0e
| +---5d27a0f8-35d0-4cdd-ac30-cbe1e744d924
| \---5d7de05f-e1f9-4639-824e-2ad41d64fe19
+---6
| +---6398f660-443e-4363-a531-9d12c8d62b88
| +---6ddd4241-9d2d-4a0a-b20d-a49190224d24
| \---6fcc6ef6-511a-4f9a-be16-a8b9d9e951fc
+---7
| +---751abfa2-0788-434d-9513-055f6b538a40
| +---76a1d7fa-f481-4adf-840d-27b680a2e513
| \---795a223a-ca0c-4a63-8dc1-cc8967d1379c
+---8
| +---80db8f0e-b4f5-48d0-af83-e589576a0631
| +---834f086a-b0b5-47b6-9727-548ccb876bdf
| +---8c8bf981-24b6-4ab8-ae53-92bdb2fce1cd
| +---8e3428a7-f63a-4576-a6f0-d4c9c3cb4d46
| \---8e414e7c-3ad6-4132-a1ff-018107d8f01e
+---9
| +---900e049d-5927-40cf-80df-5b3fbdf6672e
| +---90b707e2-ddd6-451c-bbae-88c977686ec1
| +---919244e8-9568-4cea-a6f6-113dba63e21f
| \---9a09011a-9ca4-4b2d-8f8b-ffa6c128cc35
+---a
| +---a18f5ad3-a9a7-40c2-9918-8d3504483266
| +---a23b5f63-0297-4772-a6d8-c808c4b61ba0
| +---a294c53d-9fa8-442e-b189-754d047dded3
| +---a7fe24db-3163-44ff-9382-af3404b607b1
| +---a9139650-57ef-4205-9147-a683057d975c
| +---a9ae7464-cf17-42fc-8200-d35eaf205289
| \---af80e537-5ceb-4676-b13d-956710752dbf
+---b
| +---b842d551-3a01-4d83-abcf-67f213363bc2
| +---bc5f482e-897b-4264-8c58-9132747f1051
| \---bf8a677b-3687-41fc-8078-b973879a7315
+---c
| +---c25d0fee-ae75-439c-90b4-49b8793ddf36
| +---c506c75d-dc4f-4743-818b-7cac35d79b95
| \---c9b85135-0030-426c-9146-2039eb0f27ee
+---d
| +---d0424628-bb70-4714-a44f-e02e51184ff6
| +---d283787b-795d-4e72-bca9-95752d9f10b7
| +---d4292dd4-5689-4cf5-99a6-174f97f4c41b
| \---d918e6d5-1a34-49b1-8134-3d890d45d364
+---e
| +---e1f0c851-aaa9-496e-b2d9-30607453215e
| +---edafcd97-1f51-466f-80f8-385f95f501d3
| \---ee2d8719-881a-4187-b604-c5cb9c2ca991
\---f
+---f0a77bdb-fc26-4d0d-8212-9c265e1e50a8
+---f54553de-e334-47c1-997d-76f2999982e1
+---f992a805-e6c4-4239-b2d5-7f91ea018c60
+---fc627ddd-82d4-43e7-891b-1f9bcb0cceb7
+---ff200544-b4c7-4a75-904d-63c8cee55f9d
+---ff252500-59ed-4f61-94f0-adf577958b5f
\---ff2e54a7-e235-4a65-a548-64b8772626d1