Contribute
Register

<< Solved >> Backup MacOS drive from Windows

Joined
Oct 4, 2013
Messages
20
Motherboard
Asus TUF Z390 Plus Gaming
CPU
i5 9600K @5GHz
Graphics
Radeon RX 580
Mobile Phone
  1. Android
I have
  • MacOS installed on 250GB nvme1
  • Windows installed on 250GB nvme2
  • a 8TB drive hooked to a raspberry in the other room
I can backup windows drive using dd over network no problem from MacOS. Set to run regularly from cron.
Occasionally I go to windows when want to play GTA so I'd welcome a background task in WINDOWS that would backup my MAC drive into a file while I play. I have problem finding such a basic feature in Windows. Did anyone manage it?

I know I can install Linux next to windows (or maybe as a VM inside windows) but why utilize an additional OS for a simple command? I want it to run in the background while I play GTA, to save time. The copy job takes about 1h30 which is also the duration of my play. I play once or twice a week, which is often enough for a regular dd backup.
 

trs96

Moderator
Joined
Jul 31, 2012
Messages
20,311
Motherboard
GA-Z97X-UD3H-BK
CPU
i5-4690K
Graphics
HD4600 / RX 570
Mac
  1. MacBook Pro
  2. Mac mini
Mobile Phone
  1. Android
I use Acronis True image on a bootable USB. It's the Windows version and can be used to clone the macOS disk or make a backup image of it. Works great and doesn't cost much for a perpetual license.
 
Joined
Oct 4, 2013
Messages
20
Motherboard
Asus TUF Z390 Plus Gaming
CPU
i5 9600K @5GHz
Graphics
Radeon RX 580
Mobile Phone
  1. Android
Thanks, but that is not the solution I am looking for. I want free command-line oneliner/script that would do the same as dd in MacOS does. The image file should be dd-compatible in case I decide to ditch windows or it crashes.

I think I finally have it:
I found dd for windows here: https://aeroquartet.com/treasured/dd for windows.en.html
In the webpage they identify the disk by mount point (drive letter) but in my case the macos drive is not mounted. So I identified disk number in diskpart:
Code:
DISKPART> list disk


  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online         1863 GB      0 B        *
  Disk 1    Online         1863 GB      0 B        *
  Disk 2    Online         1863 GB      0 B        *
  Disk 3    Online         1863 GB      0 B        *
  Disk 4    Online          931 GB      0 B        *
  Disk 5    Online          232 GB  1024 KB        *
  Disk 6    Online          232 GB      0 B        *
  Disk 7    Online          232 GB      0 B        *

As you see, I have 3 disks with the same size so identification is not straightforward. Disk 5 shows free space, so it's mounted - this is probably the windows drive. I have another same-size same-vendor drive for MacOS (Samsung 970 Evo Plus). So let's select disk 6 and see detail.

Code:
DISKPART> select disk 6

Disk 6 is now the selected disk.

DISKPART> detail disk

Samsung SSD 970 EVO Plus 250GB
Disk ID: {EA898092-B83E-4CFB-BACF-794719CFB16E}
Type   : NVMe
Status : Online
Path   : 0
Target : 0
LUN ID : 0
Location Path : PCIROOT(0)#PCI(1D00)#PCI(0000)#NVME(P00T00L00)
Current Read-only State : No
Read-only  : No
Boot Disk  : No
Pagefile Disk  : No
Hibernation File Disk  : No
Crashdump Disk  : No
Clustered Disk  : No

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 10        EFI          FAT32  Partition    200 MB  Healthy    Hidden


In my case it's disk 6 because disk5 is windows C drive and disk7 is the USB disk used as additional CCC backup from MacOS.

So to compose the dd command it is needed to use the disk path, not volume path. Since it's disk 6, we need to use \\.\PhysicalDrive6 path.

From administrator command prompt (started by win+r, cmd, ctrl+shift+enter)


Code:
C:\Windows\system32>\Users\vratn\OneDrive\Desktop\dd.exe if=\\.\PhysicalDrive6 of=\\192.168.1.11\ZALOHA\zalohy\mac.dd bs=1M --progress
rawwrite dd for windows version 0.5.
Written by John Newbigin <jn@it.swin.edu.au>
This program is covered by the GPL.  See copying.txt for details
49,237,983,232


I save the commands into a text file with .bat extension.

Code:
net use z: \\192.168.1.11\share /user:pi pass /persistent:yes
del z:\mac.dd.old
ren z:\mac.dd mac.dd.old
c:\Users\vratn\OneDrive\Desktop\dd.exe if=\\.\PhysicalDrive6 of=z:\mac.dd bs=1M --progress

Next step is to automate it to start at windows boot.

win+r
taskschd.msc
create task
triggers - at startup
actions - select the bat file saved in previous step
general - change user or group: Enter object name: SYSTEM (click check names)

BOOM! Automatic backup of MacOS disk upon windows startup!
 
Joined
Nov 17, 2020
Messages
68
Motherboard
Gigabyte Z490I Aorus Ultra
CPU
i9-10900K
Graphics
RX 5500 XT
Mac
  1. iMac
  2. MacBook Pro
Mobile Phone
  1. iOS
I'm looking to do a similar thing (using dd, but from linux) and I was wondering how this was working for you? Have you tried restoring from one of your backups? I don't know why it wouldn't work - I've used dd countless times to copy whole drives - but I don't want to trust my intuition until I've heard from someone else :)
 
Joined
Oct 4, 2013
Messages
20
Motherboard
Asus TUF Z390 Plus Gaming
CPU
i5 9600K @5GHz
Graphics
Radeon RX 580
Mobile Phone
  1. Android
I used dd from Linux before I deleted it and kept only dualboot MacOS with Windows. Restore using dd from Linux worked perfectly. I have not yet tried to restore from the windows-made dd but I believe it would work.
I am now logged in to Macos since it's my daily production OS so I will compare those 2 archives:
win.dd is being created using dd in MacOS.
mac.dd is being created using dd in Windows.


pc:~ ja$ file /Volumes/ZALOHA/zalohy/win.dd
/Volumes/ZALOHA/zalohy/win.dd: DOS/MBR boot sector; partition 1 : ID=0xee, start-CHS (0x0,0,1), end-CHS (0x3ff,254,63), startsector 1, 488397167 sectors, extended partition table (last)

pc:~ ja$ file /Volumes/ZALOHA/zalohy/mac.dd
/Volumes/ZALOHA/zalohy/mac.dd: DOS/MBR boot sector; partition 1 : ID=0xee, start-CHS (0x3ff,254,63), end-CHS (0x3ff,254,63), startsector 1, 488397167 sectors, extended partition table (last)

the "file" command recognizes both as the same "format" so I suppose both are compatible and restorable.

Meanwhile I modified windows script so that it deletes old backup only after new backup is complete. Sometimes I play GTA less time than a dd backup takes.
 
Top