Takeout#5707
Conversation
|
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
86b9ee8 to
fbc3a93
Compare
ad995ae to
b222aa7
Compare
diocas
left a comment
There was a problem hiding this comment.
I didn't check the archiver code, but I have the impression that this is a copy of it. Didn't we discuss that we would integrate the current archive code in the takeout, so that we only set the logic in a single place? The advantage of the takeout would be the possibility to keep track of error instead of just killing the connection. And the fact that we can chunk, but maybe we can achieve a single logic for both (infinite chunk size would have the same output as the archiver, no?)
|
|
||
| return gw.Flush() | ||
| }) | ||
| if err != nil { |
There was a problem hiding this comment.
Shall we ignore/skip errors with files and write them (the error) to a file (that the user can check)?
| if err != nil { | ||
| return errors.Wrap(err, "cleanup: could not get takeout containers") | ||
| } | ||
| if containerRes.Status.Code != rpc.Code_CODE_OK { |
There was a problem hiding this comment.
Should never be the case, but make sure ContainerRes.Status != nil, otherwise you get a panic.
f06edd1 to
0340dc5
Compare
906705e to
57d5b53
Compare
CERNBox Takeout
Users currently have no convenient, self-service way to obtain a full, offline copy of everything they store in their CERNBox personal space. This is needed for personal backups, offboarding (e.g. leaving CERN), and data-access requests. "Takeout" lets a user trigger an export from the web interface; the system packages their space into one or more archives asynchronously, stores them in a pre-configured EOS location, and notifies the user by email with download links when the export is ready. Exports expire automatically after a configurable retention period.
Features
This PR mplements the core takeout logic as a Reva background job. Given a user, a max archive size, and a format, the job collects the contents of the user's personal space, packages them into one or more archives of the requested format, splitting output so that no single archive exceeds the configured max size, and uploads the artifact(s) to a pre-configured EOS folder.
It exposes two HTTP endpoints: one to create a new takeout job (taking max size and format), and one to get the status of the current/last takeout for the authenticated user. The create endpoint enforces one active job per user, if a takeout is already running, it returns the existing job rather than starting a new one. The status endpoint returns the job state and, when completed, the download link(s) and expiry. In particular: