Skip to content

Repository files navigation

partclone for Windows

Windows (x64) builds of partclone, the partition imaging tool behind Clonezilla. Built with Cygwin, so the tools work as they do on Linux, including device paths like /dev/sdb2.

Download the latest release zip, unzip it anywhere, and run the tools from PowerShell or cmd. No installation or Cygwin needed.

# Restore a partclone image to a full-size raw partition image
.\partclone.restore.exe -s D:\backups\data.pcl.img -o D:\data.img -W -C

-W writes a file the full size of the original partition. On an NTFS drive the file is sparse, so it only takes up as much space as the partition had in use. -C skips the check that the drive has room for the full size.

More examples:

# Restore onto a partition instead (Windows Disk 1, partition 2)
.\partclone.restore.exe -s D:\backups\data.pcl.img -o /dev/sdb2

# Back up an NTFS partition, then verify the image
.\partclone.ntfs.exe -c -s /dev/sdb2 -o D:\backups\data.pcl.img
.\partclone.chkimg.exe -s D:\backups\data.pcl.img

Supports NTFS, ext2/3/4, FAT, exFAT, btrfs, XFS, HFS+, APFS, F2FS and minix, plus partclone.dd for sector-by-sector copies of anything else. The zip also includes mkntfs, ntfsfix and ntfsinfo.

Warning: /dev/... access needs an elevated terminal. Take a volume offline in diskpart before backing it up or restoring onto it: there's no VSS/snapshot support, and partclone can't tell when Windows is using a volume. The README inside the zip has more usage and safety notes.

What this repo is

A friendly fork of Thomas-Tsai/partclone. The windows branch is the latest upstream release plus a few commits for Windows:

  1. Cygwin port: portability fixes across all filesystem modules. Details in BUILD-WINDOWS.md, including a subtle ntfs-3g struct-packing landmine.
  2. Log file falls back to %TEMP%, so the tools run without -L (Windows has no /var/log).
  3. -C also skips the free-space check on -W restores, so a raw image can go on a drive with less free space than the full partition size.
  4. -W output stays sparse on NTFS: a raw image of a 2 TB partition with 44 GB in use takes about 44 GB, not 2 TB.

These are kept here rather than upstreamed for now.

How releases are made

  • A daily check-upstream job opens an issue when upstream publishes a new release.
  • The maintainer runs ci/update-to.sh <version> to rebase windows onto the new tag, pushes, and triggers build-release.
  • CI builds everything from source on a clean windows-latest runner, runs the tests (ci/test.sh, ci/test-dist.ps1), and publishes the zip as release v<version>-win<N>.

To build locally, install Cygwin with the packages listed in build.yml, then run ci/build.sh && ci/test.sh. See BUILD-WINDOWS.md for details.

License

GPL-2.0, same as upstream partclone (see COPYING). Each release zip includes a SOURCES.txt pointing to the exact source of every bundled component (partclone, ntfs-3g, userspace-rcu and the Cygwin runtime).

All credit for partclone goes to Thomas Tsai and the partclone contributors. This repo only makes it run on Windows.

About

Native Windows builds of partclone (Clonezilla's partition imaging tool) - clone/restore NTFS, ext4, FAT, exFAT, btrfs, XFS and more using Linux-style /dev/sdXN device paths

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages