@@ -131,19 +131,23 @@ message ImportFromFsSettings {
131131 * '/scheme.pb' - object with information about scheme, indexes, etc;
132132 * '/permissions.pb' - object with information about ACL and owner;
133133 * '/metadata.json' - object with metadata about the backup.
134- The path in FS is specified relative to base_path.
135- Example: "my_export/table1"
134+ The FS path can be either provided explicitly (relative to base_path)
135+ Or, if the export contains the database objects list, you may specify the database object name,
136+ and the FS prefix will be looked up in the database objects list by the import procedure
136137 */
137- string source_path = 1 [ (required) = true ] ;
138+ string source_path = 1 ;
138139
139- // Database path to a table to import to.
140- string destination_path = 2 [(required) = true ];
140+ // Database path to a database object to import the item to
141+ // Resolved relative to the default destination_path
142+ // May be omitted if the item's source_path is specified, in this case will be taken equal to it
143+ string destination_path = 2 ;
141144 }
142145
143146 // Base path on FS where the export is located
144- // Path to the mounted directory in the case of NFS
147+ // In the case of NFS, one of the directories in the path must be mounted
145148 // Must be an absolute path
146149 // Example: /mnt/exports
150+ // SchemaMapping file with the list of objects is read from this path
147151 string base_path = 1 [(required) = true ];
148152
149153 repeated Item items = 2 ; // Empty collection means import of all export objects
@@ -160,6 +164,15 @@ message ImportFromFsSettings {
160164
161165 // Skip checksum validation during import
162166 bool skip_checksum_validation = 6 ;
167+
168+ // Destination path to restore paths inside database
169+ // Default value is database root
170+ string destination_path = 7 ;
171+
172+ // Settings how data is encrypted.
173+ // If encryption_settings field is not specified,
174+ // the resulting data is considered not encrypted.
175+ Ydb.Export.EncryptionSettings encryption_settings = 8 ;
163176}
164177
165178message ImportFromFsResult {
@@ -263,6 +276,66 @@ message ListObjectsInS3ExportResponse {
263276 Ydb.Operations.Operation operation = 1 ;
264277}
265278
279+ message ListObjectsInFsExportSettings {
280+ message Item {
281+ // Database object path
282+ // Recursive for directories
283+ string path = 1 ;
284+ }
285+
286+ string base_path = 1 [(required) = true ];
287+ repeated Item items = 2 ;
288+ uint32 number_of_retries = 3 ;
289+
290+ // Settings how data is encrypted.
291+ // If encryption_settings field is not specified,
292+ // the resulting data is considered not encrypted.
293+ Ydb.Export.EncryptionSettings encryption_settings = 4 ;
294+ }
295+
296+ message ListObjectsInFsExportResult {
297+ message Item {
298+ /* YDB database objects in S3 are stored in one or more S3 objects (see ydb_export.proto).
299+ The S3 object name begins with a prefix, followed by:
300+ * '/data_PartNumber', where 'PartNumber' represents the index of the part, starting at zero;
301+ * '/scheme.pb' - object with information about scheme, indexes, etc;
302+ * '/permissions.pb' - object with information about ACL and owner;
303+ * '/metadata.json' - object with metadata about the backup.
304+ */
305+ string fs_path = 1 ;
306+ string db_path = 2 ;
307+ }
308+
309+ repeated Item items = 1 ;
310+
311+ // This token allows you to get the next page of results for ListObjectsInFsExport requests,
312+ // if the number of results is larger than `page_size` specified in the request.
313+ // To get the next page, specify the value of `next_page_token` as a value for
314+ // the `page_token` parameter in the next ListObjectsInFsExport request. Subsequent ListObjectsInFsExport
315+ // requests will have their own `next_page_token` to continue paging through the results.
316+ string next_page_token = 2 ;
317+ }
318+
319+ message ListObjectsInFsExportRequest {
320+ Ydb.Operations.OperationParams operation_params = 1 ;
321+ ListObjectsInFsExportSettings settings = 2 [(required) = true ];
322+
323+ // The maximum number of results per page that should be returned. If the number of available
324+ // results is larger than `page_size`, the service returns a `next_page_token` that can be used
325+ // to get the next page of results in subsequent ListObjectsInFsExport requests.
326+ // 0 means that server returns all objects.
327+ int64 page_size = 3 [(value) = "<= 10000" ];
328+
329+ // Page token. Set `page_token` to the `next_page_token` returned by a previous ListObjectsInFsExport
330+ // request to get the next page of results.
331+ string page_token = 4 ;
332+ }
333+
334+ message ListObjectsInFsExportResponse {
335+ // operation.result = ListObjectsInFsExportResult
336+ Ydb.Operations.Operation operation = 1 ;
337+ }
338+
266339/// Data
267340message YdbDumpFormat {
268341 repeated string columns = 1 ;
0 commit comments