Search notes:

Shell command: ntfsclone

Backing up and restoring an NTFS partition

$ sudo /usr/sbin/ntfsclone --save-image --output /mnt/bkp/windows-clone-2025-01-25 /dev/nvme0n1p3
Note: the backed up image file is smaller than the NTFS partition (318G):
$ ls -lh /mnt/bkp/windows-clone-2025-01-25 
-rwxrwxrwx 1 root root 272G Jan 26 17:10 /mnt/bkp/windows-clone-2025-01-25

$ lsblk /dev/nvme0n1p3
NAME      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
nvme0n1p3 259:3    0  318G  0 part 
Now: Restarting the computer with Windows and changing (deleting, renaming, creating) some files.
Then: Again restarting the computer, this time in Linux.
$ sudo /usr/sbin/ntfsclone --restore-image --overwrite /dev/nvme0n1p3 /mnt/bkp/windows-clone-2025-01-25
As far as I can tell, the only difference to using dd is that ntfsclone creates «sparse files» (which account for the smaller image files).

See also

NTFS
Shell commands

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:51 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(51): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(66): id_of(Object(PDO), 'uri', '/notes/Linux/sh...') #2 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Linux/sh...', 1758200352, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #3 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Linux/shell/commands/ntfsclone(62): insert_webrequest() #4 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 51