Skip to content

Add a keep-files API #287

@frhuelsz

Description

@frhuelsz

Right now, users must use script hooks to migrate any state when performing an update. A keepFiles or migration API could simplify this operation by removing the extra complexity of a script and transforming this into a declarative operation that can be better understood by Trident.

Such API would also assist users in case of a rollback where maybe some migrated files need to be migrated back (e.g. credentials/certificates).

The API could look something like:

migration:
  # Could be a file or dir
  - path: /path/to/important/files
    # Optional, assumed to be the same as `path`
    migrationPath: /path/to/place/the/files/at
    mode: <> # Optional, can be used to override
    owner: <> # Optional, can be used to override
    group: <> # Optional, can be set to override
    mode: <> # how to handle this migration

mode: would be the more interesting field, some examples of possible values:

  • simple (default): the file is only copied to the new system
  • bidirectional: the file will be copied back (and overridden if different) in case of a rollback

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions