-
Notifications
You must be signed in to change notification settings - Fork 19
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
new-post: introducing the prune command in REANA client #35
Open
giuseppe-steduto
wants to merge
1
commit into
reanahub:master
Choose a base branch
from
giuseppe-steduto:add-prune-command-post
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
title: "Optimizing disk space in REANA workspaces: the prune command" | ||
date: 2023-12-05T07:00:00+01:00 | ||
--- | ||
|
||
With the introduction of the `prune` command, managing disk space in REANA workspaces has been simplified. | ||
This feature offers an efficient way to identify and remove temporary files, | ||
thereby conserving storage while preserving the reproducibility of your workflows. | ||
|
||
<!--more--> | ||
|
||
To manage the disk space in REANA, you might have used the `rm` command to manually | ||
delete unnecessary files, for example by running `reana-client rm -w myanalysis.42 tmp/mytmpdata.csv`. | ||
Although it worked, it was time-consuming and required extra care not to delete essential input or output files. | ||
|
||
`reana-client` includes the `prune` command as a more convenient and safer way to free up disk space | ||
in your REANA workspaces. | ||
It is designed to manage workspace files intelligently, automatically identifying and deleting | ||
temporary files that are neither inputs nor outputs, freeing up your storage significantly and effortlessly. | ||
Here's how you can use it: | ||
|
||
```console | ||
$ reana-client prune -w my-analysis.42 | ||
==> SUCCESS: The workspace has been correctly pruned. | ||
``` | ||
|
||
This will delete all temporary files in the workspace of the workflow `my-analysis.42`. | ||
If you need to free up even more space, you can also delete input or output files | ||
by using the `--include-inputs` or `--include-outputs` flags, respectively. | ||
|
||
However, a word of caution: it's important to remember that running the `prune` command will permanently delete the files | ||
from your workspace. This means that you should make sure you have backed up any files you want to keep | ||
before running the command. Additionally, be careful when using the `--include-inputs` or | ||
`--include-outputs` flags, as deleting inputs will make it impossible to run your workflow | ||
again and by deleting output files you will lose the results of your workflow run. | ||
|
||
By the way, did you know you can keep your workspaces clean automatically? REANA features the possibility | ||
to configure one or more *workspace file retention rules* for your workflows that will automatically | ||
and periodically delete the specified files after a certain amount of time. | ||
You can read more about this feature in the [related blog post](https://blog.reana.io/posts/2022/workspace-file-retention-rules/). | ||
|
||
We hope you find this feature useful for managing your REANA workspaces and freeing up | ||
valuable disk space. As always, if you have any feedback or suggestions for how we can improve | ||
REANA, please let us know! | ||
|
||
## See also | ||
|
||
- [REANA Client](https://reana-client.readthedocs.io/en/latest/) documentation page | ||
- [Workspace retention rules](https://blog.reana.io/posts/2022/workspace-file-retention-rules/) blog post |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about also adding a brief paragraph explaining that users can achieve the same thing in a more automatic way by using retention rules, and linking to the related blog post?