CLI for keeping large BR200 scratch datasets warm with resumable refresh jobs.
Project description
br-scratch-keepalive
br-scratch-keepalive is a Python 3.9+ package that installs the scratch-keepalive CLI for running inside BR200 shell sessions. It manages large datasets under /N/scratch/$USER/..., refreshes them on a recurring scheduler, and keeps resumable checkpoint state outside scratch.
This is a best-effort anti-purge tool. It reduces risk for scratch datasets; it does not make scratch archival.
What it does
- registers large datasets under your BR200 scratch space
- keeps a
keep-untilpolicy per dataset - runs metadata-oriented refreshes, not bytewise rereads
- checkpoints partial refresh progress so the next run resumes instead of starting over
- stores logs, registry state, and checkpoint files outside scratch
- installs a recurring scheduler entry for the current BR200 user
What it does not do
- it does not make scratch permanent
- it does not archive to Slate, Slate-Project, or SDA
- it does not run from your laptop
- it does not require or use a personal SSH alias
- it does not redownload missing data
Install
From inside BR200:
python -m pip install br-scratch-keepalive
Or from a cloned repo:
python -m pip install .
BR200 quickstart
python -m pip install .
scratch-keepalive init --profile br200
scratch-keepalive add \
--name mr-rate \
--path /N/scratch/$USER/datasets/Forithmus/MR-RATE \
--keep-until 2026-07-31
scratch-keepalive refresh --name mr-rate
scratch-keepalive install-cron
scratch-keepalive status --name mr-rate
Recommended workflow
- Log into BR200 normally.
- Install the package into your BR200 Python environment.
- Run
scratch-keepalive init --profile br200. - Add one or more datasets under
/N/scratch/$USER/.... - Run one manual refresh to verify permissions and state layout.
- Install the recurring scheduler entry.
- Use
statusanddoctorto inspect health.
Commands
scratch-keepalive init
scratch-keepalive add
scratch-keepalive list
scratch-keepalive status
scratch-keepalive refresh
scratch-keepalive extend
scratch-keepalive enable
scratch-keepalive disable
scratch-keepalive remove
scratch-keepalive install-cron
scratch-keepalive uninstall-cron
scratch-keepalive doctor
scratch-keepalive repair
State layout
The BR200 profile keeps control-plane state outside scratch:
- registry: persistent dataset state
- checkpoints: resumable partial-refresh state
- logs: per-run refresh logs
- sentinel: a small tool-owned file in the dataset root
Resume semantics
Refreshes are split into deterministic units. If a refresh run fails or times out:
- completed units stay recorded in checkpoint state
- remaining units are retried on the next run
- the checkpoint is deleted only after the full dataset refresh completes
Publishing
Public package name:
- package:
br-scratch-keepalive - CLI command:
scratch-keepalive
Notes
- Run this from inside BR200, not from your laptop.
- The tool does not rely on a local SSH alias like
br200. - Default recurring cadence is every 14 days.
- Default recurring job request is
general,1 CPU,2G,2:00:00. - Logs and checkpoint state live outside scratch.
- When
scrontabis disabled on BR200,install-cronfalls back to a self-resubmitting Slurm job.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file br_scratch_keepalive-0.1.0.tar.gz.
File metadata
- Download URL: br_scratch_keepalive-0.1.0.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2299f95839829ccea28730852460fe23e8faf048883e0e4726faaf6ac81434d
|
|
| MD5 |
a978fba02917530996a80d01f0b47918
|
|
| BLAKE2b-256 |
8e305598507cadba853fbb507270d96b8c6dd6d4d4d31014f688498ef7ce4767
|
File details
Details for the file br_scratch_keepalive-0.1.0-py3-none-any.whl.
File metadata
- Download URL: br_scratch_keepalive-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c81f3fcaa9b07a40c76774938f752d5084dcaf8ef46d5ebf691272d828b5b720
|
|
| MD5 |
55815e60b6cf1a31c36865ab5f7c9ac2
|
|
| BLAKE2b-256 |
74bd21805bb3422d89858e2b2707dea84098b7d34d310f57c3197f5c70ae885f
|