Skip to main content

Copy-on-Write Filesystem - a FUSE-based versioning filesystem

Project description

COWFS - Copy-on-Write Filesystem

PyPI

A userspace Copy-on-Write filesystem built with FUSE. Every write transparently creates a new version - enabling instant restore, snapshot tagging, and content deduplication.

Status

  • Core FUSE read/write path implemented
  • Version history + restore implemented
  • GC implemented (--dry-run, --keep-last, --before)
  • Snapshot lifecycle implemented (create, list, show, restore, delete)
  • GitHub Actions CI workflow added (tests + coverage + required static analysis)
  • Tag-based PyPI publishing implemented and validated (cowfs 0.2.4 live)

Quick Start

pip install cowfs

# Mount
cowfs mount ~/storage ~/mnt

# Use like a normal filesystem
echo "hello" > ~/mnt/test.txt
echo "world" > ~/mnt/test.txt

# Inspect version history and stats
cowfs history /test.txt --storage ~/storage
cowfs stats --storage ~/storage
cowfs log --storage ~/storage --limit 20

# Restore to an older version
cowfs restore /test.txt --version 1 --storage ~/storage

# Create and inspect snapshot
cowfs snapshot create baseline --storage ~/storage
cowfs snapshot list --storage ~/storage
cowfs snapshot show baseline --storage ~/storage

# Restore filesystem to snapshot
cowfs snapshot restore baseline --storage ~/storage
# keep files created after snapshot:
cowfs snapshot restore baseline --keep-new --storage ~/storage

# Garbage collection
cowfs gc --storage ~/storage --dry-run
cowfs gc --storage ~/storage --keep-last 3
cowfs gc --storage ~/storage --before "2026-01-01 00:00:00"

# Unmount when done
cowfs umount ~/mnt

CLI Commands

cowfs mount <storage_dir> <mount_point> [--debug]
cowfs umount <mount_point>

cowfs history <file_path> --storage <storage_dir> [--json]
cowfs restore <file_path> (--version <n> | --before "<datetime>") --storage <storage_dir> [--dry-run] [--json]
cowfs log --storage <storage_dir> [--limit <n>] [--action <name>] [--path-prefix <prefix>] [--since "<datetime>"] [--until "<datetime>"] [--json]

cowfs stats --storage <storage_dir> [--json]
cowfs gc --storage <storage_dir> [--dry-run] [--keep-last <n>] [--before "<datetime>"] [--json]

cowfs snapshot create <name> [--description "..."] --storage <storage_dir> [--json]
cowfs snapshot list --storage <storage_dir> [--json]
cowfs snapshot show <name> --storage <storage_dir> [--json]
cowfs snapshot restore <name> [--keep-new] --storage <storage_dir> [--dry-run] [--json]
cowfs snapshot delete <name> --storage <storage_dir> [--json]

Development

git clone https://github.com/yourusername/cowfs.git
cd cowfs
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest

Documentation Site

pip install "mkdocs>=1.6.0,<2.0.0" "mkdocs-material>=9.5.0"
mkdocs serve
# build static site:
mkdocs build

Release

  • Tag-based publishing is configured in .github/workflows/publish.yml.
  • See full release instructions in RELEASE.md.
  • Expected tag format: vX.Y.Z (example: v0.2.0).

Release Checklist

# 1) bump version in pyproject.toml (example: 0.2.2)
git add pyproject.toml
git commit -m "Release 0.2.2"
git push origin master

# 2) create matching release tag
git tag v0.2.2
git push origin v0.2.2

# 3) after Publish workflow succeeds, verify install
pip install -U cowfs==0.2.2

Requirements

  • Linux with FUSE support (libfuse3-dev)
  • Python 3.11+
  • Windows: use WSL2 (Ubuntu) for mount functionality

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cowfs-0.2.6.tar.gz (47.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cowfs-0.2.6-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file cowfs-0.2.6.tar.gz.

File metadata

  • Download URL: cowfs-0.2.6.tar.gz
  • Upload date:
  • Size: 47.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cowfs-0.2.6.tar.gz
Algorithm Hash digest
SHA256 babc39c67273d700e6cc6425e8f402cb4ffb76d52b287cc52d2690e4e9b109a0
MD5 024061cb2e15c3e84626b28ebf9dc911
BLAKE2b-256 ec9f06e3c801417c4c608239e3b29c2f9b08b632c4aa959d0bc06111a169ac00

See more details on using hashes here.

Provenance

The following attestation bundles were made for cowfs-0.2.6.tar.gz:

Publisher: publish.yml on atikulmunna/COW-Filesystem

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cowfs-0.2.6-py3-none-any.whl.

File metadata

  • Download URL: cowfs-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cowfs-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 087335c2985ac8a4e5225ef21821f9a0b8d17c371f2e2d61d6cd1e60bfbf9673
MD5 0b473c9809679f5171c7b5685042f253
BLAKE2b-256 7ccea463fd0d5cdcf174af7bdb4f3a54e4e911bac3019ec7a5a82ecb9281e756

See more details on using hashes here.

Provenance

The following attestation bundles were made for cowfs-0.2.6-py3-none-any.whl:

Publisher: publish.yml on atikulmunna/COW-Filesystem

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page