Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: backup and restore specification #1610

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

TerryHowe
Copy link
Member

What this PR does / why we need it:

Specification for the way the oras backup and oras restore commands will work.

Which issue(s) this PR fixes:

Partial: #1366

Copy link

codecov bot commented Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.37%. Comparing base (13dce59) to head (26f3f1a).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1610      +/-   ##
==========================================
+ Coverage   84.30%   84.37%   +0.06%     
==========================================
  Files         120      120              
  Lines        5449     5460      +11     
==========================================
+ Hits         4594     4607      +13     
+ Misses        608      606       -2     
  Partials      247      247              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TerryHowe TerryHowe force-pushed the backup-restore-spec branch from a67cd77 to 7e33f88 Compare January 23, 2025 14:50
Copy link
Contributor

@sabre1041 sabre1041 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feature is somewhat confusing. I understand the motivation, but it does not accurately reflect backup/restore. A possible suggestion is to use dump/publish instead

docs/proposals/backup-restore.md Outdated Show resolved Hide resolved
@@ -0,0 +1,107 @@
# Backup and Restore Commands
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a problem statement that is included within this proposal that illustrates why this feature is needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.


This document describes how the backup and restore commands will work and how the feature will be rolled out.
The proposal is to create the feature as a minimum viable product and follow that up with non breaking features to the commands.
The initial implementation will be the easiest implementation that is useful.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit confusing.

@@ -0,0 +1,107 @@
# Backup and Restore Commands

This document describes how the backup and restore commands will work and how the feature will be rolled out.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are we backing up and restoring?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added something in a new paragraph above this.


### oras backup

The backup command will initially only support reading a list of files from the command line and writing to a directory:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List of files or list or artifacts?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

docs/proposals/backup-restore.md Outdated Show resolved Hide resolved
Initially, the restore command will only support reading a directory and writing to a registry:

```bash
oras restore --input ./mirror localhost:15000/my-mirror
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will there be flags to support authentication and TLS for the remote registry?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, all the normal registry flags. I added some text about that.


## Compressed Tar File Support

After the command supports directory write and read, support will be added for write and read to a compressed tar file.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this trying to state that future enhancements after the initial release will add support for compressed archives?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

docs/proposals/backup-restore.md Outdated Show resolved Hide resolved
docs/proposals/backup-restore.md Outdated Show resolved Hide resolved
TerryHowe and others added 2 commits February 6, 2025 10:37
Co-authored-by: Andrew Block <[email protected]>
Signed-off-by: Terry Howe <[email protected]>
Co-authored-by: Andrew Block <[email protected]>
Signed-off-by: Terry Howe <[email protected]>
@TerryHowe
Copy link
Member Author

This feature is somewhat confusing. I understand the motivation, but it does not accurately reflect backup/restore. A possible suggestion is to use dump/publish instead

If you think of it reading and writing tgz files, I think backup/restore works pretty well.

Names are hard, the equivalent docker command would be save/load.

TerryHowe and others added 3 commits February 6, 2025 12:43
Co-authored-by: Andrew Block <[email protected]>
Signed-off-by: Terry Howe <[email protected]>
Co-authored-by: Andrew Block <[email protected]>
Signed-off-by: Terry Howe <[email protected]>
Signed-off-by: Terry Howe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants