Workspaces/Advanced Features/ws restore: Difference between revisions

From bwHPC Wiki
Jump to navigation Jump to search
(Created page with "= ws_restore - Restore Expired Workspace = {| class="wikitable" |- !style="width:40%" | Works on cluster !style="width:10%" | bwUC 3.0 !style="width:10%" | BinAC2 !style="width:10%" | Helix !style="width:10%" | JUSTUS 2 !style="width:10%" | NEMO2 |- |<tt>ws_restore</tt> |style="background-color:#90EE90; text-align:center;" | ✓ |style="background-color:#90EE90; text-align:center;" | ✓ |style="background-color:#90EE90; text-align:center;" | ✓ |style="background-col...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
= ws_restore - Restore Expired Workspace =
= ws_restore - Restore Expired Workspace =

{| class="wikitable"
|-
!style="width:40%" | Works on cluster
!style="width:10%" | bwUC 3.0
!style="width:10%" | BinAC2
!style="width:10%" | Helix
!style="width:10%" | JUSTUS 2
!style="width:10%" | NEMO2
|-
|<tt>ws_restore</tt>
|style="background-color:#90EE90; text-align:center;" | ✓
|style="background-color:#90EE90; text-align:center;" | ✓
|style="background-color:#90EE90; text-align:center;" | ✓
|style="background-color:#90EE90; text-align:center;" | ✓
|style="background-color:#90EE90; text-align:center;" | ✓
|}


For a certain (system-specific) grace time following workspace expiration, a workspace can be restored.
For a certain (system-specific) grace time following workspace expiration, a workspace can be restored.
Line 77: Line 60:
== Cluster-Specific Information ==
== Cluster-Specific Information ==


Grace periods for expired/released workspaces vary by cluster and are configured via the <tt>keeptime</tt> parameter in <tt>/etc/ws.conf</tt>:
Grace periods for expired/released workspaces vary by cluster:


{| class="wikitable"
{| class="wikitable"
Line 107: Line 90:


'''Note:'''
'''Note:'''
* '''Expired workspaces''' (reached end of lifetime) are kept for <tt>keeptime</tt> days configured in <tt>/etc/ws.conf</tt>
* '''Expired workspaces''' (reached end of lifetime) are kept for <tt>keeptime</tt>
* '''Released workspaces''' (via <tt>ws_release</tt>) are kept until the next automated cleanup cycle
* '''Released workspaces''' (via <tt>ws_release</tt>) are kept until the next automated cleanup cycle
* '''Actual deletion''' happens during automated cleanup runs, typically during nighttime
* '''Actual deletion''' happens during automated cleanup runs, typically during nighttime

Latest revision as of 17:01, 2 December 2025

ws_restore - Restore Expired Workspace

For a certain (system-specific) grace time following workspace expiration, a workspace can be restored.

Syntax

ws_restore [options] workspace_name target_name | -l

Restore Procedure

(1) Display restorable workspaces:

  $ ws_restore -l

This will list all workspaces that can still be recovered. You can use -b or --brief to hide the unavailability date in the list.

(2) Create a new workspace as the target for the restore:

  $ ws_allocate restored 60

(3) Restore the expired workspace:

  $ ws_restore <full_name_of_expired_workspace> restored

Important:

  • The expired workspace must be specified using the full name as printed by ws_restore -l (not as printed by ws_list!), including username prefix and timestamp suffix (otherwise it cannot be uniquely identified)
  • The target workspace must be given with just its short name as listed by ws_list, without the username prefix
  • ws_restore can only work on the same filesystem. Ensure the new workspace is on the same filesystem as the expired workspace. Use -F <filesystem> flag if needed

Example:

  $ ws_restore username-myWs-0 restored

Options

Option Description
-l, --list List restorable workspaces. Use this first to see what can be recovered
-b, --brief Do not show unavailability date in list (used with -l)
-n <name> Workspace name (alternative to positional argument)
-t <target> Existing target workspace name (alternative to positional argument)
-F <filesystem> Specify filesystem where the workspace is located
-u <username> Username (for restoring other users' workspaces if permitted)

Cluster-Specific Information

Grace periods for expired/released workspaces vary by cluster:

Cluster Expired Workspace Retention (keeptime) Released Workspace Grace Period
bwUniCluster 3.0 30 days Until next cleanup cycle
Helix System-specific (check with support) Until next cleanup cycle
JUSTUS 2 System-specific (check with support) Until next cleanup cycle
BinAC2 System-specific (check with support) Until next cleanup cycle
NEMO2 30 days Until next cleanup cycle

Note:

  • Expired workspaces (reached end of lifetime) are kept for keeptime
  • Released workspaces (via ws_release) are kept until the next automated cleanup cycle
  • Actual deletion happens during automated cleanup runs, typically during nighttime
  • This allows users to recover accidentally released workspaces quickly, while giving more time for expired workspaces

For more information: $ ws_restore -h or man ws_restore

If Workspace Cannot Be Restored

If the workspace is not visible/restorable, it has been permanently deleted and cannot be restored, not even by system administrators.

Helix-specific - Workspace Snapshots

On Helix, if the workspace can't be restored anymore using ws_restore, you can check the snapshots under:

  /work/.snapshots/<timepoint>/ws/

Important notes about snapshots:

  • Snapshots are point-in-time copies of the workspace filesystem
  • Changes that happened since the last snapshot was created are lost
  • Browse available snapshot timepoints in /work/.snapshots/
  • Caution: The Helix team tries to keep the latest snapshots, but they cannot guarantee that snapshots will be available at all times
  • Snapshots are a last resort when ws_restore no longer works

How to use snapshots:

  $ ls /work/.snapshots/                    # List available snapshot timepoints
  $ cd /work/.snapshots/2025-11-15_00.00.00/ws/
  $ ls                                      # Find your old workspace directory
  $ cp -r username-myWs-0 /path/to/active/workspace/  # Copy data to active workspace

Contact Helix support if you need assistance with snapshot recovery.

Please remember: Workspaces are intended solely for temporary work data, and there is no backup of data in the workspaces.

Recommendation: Email reminders are sent automatically. You can optionally customize reminder timing with -r option to be notified earlier, giving you time to extend the workspace or backup important data to appropriate permanent storage. See Reminders & Configuration.