Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

Request Method PUT
Description

Uploads the folder and all its contents including sub-folders and their contents. 

URI Syntax

To find a folder using the path, the path needs to be URL encoded, (e.g., use %2F for a / and %20 for a ' ' (space).)

No Format
curl -u '<username>:<password>' -X PUT --data-binary @<pathToZipFile> -H 'Content-Type: application/zip' 'http://<datameerServer>:<port>/api/filesystem/folders/<folderPath>||<UUID>||<file-id>/restore'
Verification

The ZIP file downloaded is located in the directory the REST call was given. 

Restrictions & Notes
  • When creating a backup, all dependencies need to be located within the folder being backed up, otherwise an error occurs.
  • Within the zip file, all JSONs must use Datameer X specific endings (e.g., .imp, .dst, NOT .json).
  • If the contents of the zip file are present in the target location, the restore action will fail.
  • When restoring the contents of a zip file, the uploader becomes the OWNER of the files, with default permissions.
  • If a folder is specified by folder path but the folder doesn't exist, that folder is created and retains the user's capabilities and permissions.

...

Anchor
restore_group
restore_group
Restore File or Folder Group Permissions

Request Method PUT
Description

Restores each file or folder with the group permissions specified in the zip file.

URI Syntax
No Format
curl -u '<username>:<password>' -X PUT --data-binary @<pathToZipFile> -H 'Content-Type: application/zip' 'http://<datameerServer>:<port>/api/filesystem/folders/<folderPath>||<UUID>||<fileID>/restore?includeGroupPermissions'

IgnoreUnknownGroups


Description

Restores group permissions and skips unknown groups. 

Info
titleINFO

This option takes effect only when 'includeGroupPermissions' or 'includeDataPermissions' is set.

Unknown groups are skipped. When unknown groups are found and not set to skip, the restore operation fails.

URI Syntax
No Format
curl -u '<username>:<password>' -X PUT --data-binary @<pathToZipFile> -H 'Content-Type: application/zip' 'http://<datameerServer>:<port>/api/filesystem/folders/<folderPath>||<UUID>||<fileID>/restore?includeGroupPermissions&ignoreUnknownGroups'

...

Request Method PUT
Description

Restores each file or folder with the owner specified in the zip file.

URI Syntax
No Format
curl -u '<username>:<password>' -X PUT --data-binary @<pathToZipFile> -H 'Content-Type: application/zip''http://<datameerServer>:<port>/api/filesystem/folders/<folderPath>||<UUID>||<fileID>/restore?includeOwner'
Restriction & Notes

Restore operation is aborted if the specified owner is unknown to Datameer X unless the option 'substituteMissingUser' is passed.

When option 'substituteMissingUser' is passed, unknown owners are substituted by the caller.

substituteMissingUser


Description

Restore owners of files by substituting unknown users with the caller. 

Info
titleINFO

Only takes affect when 'includeOwner' is specified.

If the user specified in the backup file isn't present in the target system, the owner is set to the restoring user.

URI Syntax
No Format
curl -u '<username>:<password>' -X PUT --data-binary @<pathToZipFile> -H 'Content-Type: application/zip' 'http://<datameerServer>:<port>/api/filesystem/folders/<folderPath>||<UUID>||<fileID>/restore?includeOwner&substituteMissingUser'