Cloning Booted RPi’s microSD card on Windows PC through Network

ab cd

Senior Member

Cloning Booted RPi’s microSD card on Windows PC through Network​

This method creates a backup copy of microSD card of a booted RPi on Windows Computer through Network (LAN or Internet).

This method is good for backing up microSD card of RPi for which physical access is difficult, such as those installed at remote locations or at a hard to access location.

There are two options to use it

Without installing the software raspiBackup on your RPi.
Just download and run run the script. This is good if you want to create backup only once or occasionally.

Install the software raspiBackup on RPi.
This software can be configured to perform regular backups automatically at specified intervals.

Last edited:

ab cd

Senior Member
Without installing the software raspiBackup on your RPi.

(1) On Windows computer do following:
  • Create a folder rpi-clone to hold the cloned img files
  • Enable Network Sharing
  • Grant sharing permission to folder rpi-clone
For items (1) above, please see detailed instructions here:
Option One: Create a Share on Windows and Access It From Linux

(2) On RPi, create a folder /home/pi/windows and mounted on it Windows shared folder rpi-clone.
## IP address of Windows PC =
## User name of Windows PC = abcd
## Shared folder on Windows PC = rpi-clone
## Mount-point folder on RPi = /home/pi/windows

sudo mkdir /home/pi/windows

sudo apt-get install cifs-utils

## In command below, replace:
## by IP of your Windows computer
## abcd by your user name on Windows computer

sudo mount.cifs // /home/pi/windows -o user=abcd

Password for [email protected]// ********

(3) Download and Run Script
Downloaded and run the raspiBackup script by following commands

curl -sSLO

sudo bash ./ -a : -o : -m detailed /home/pi/windows.

The details of options (-a : -o : -m detailed ) in the 2nd command above are as below:
(a) Save cloned image in folder /home/pi/windows
(b) Use dd
(c) Use compression
(d) Output in terminal, the progress status during execution

(4) Following is the output of running the script
--- RBK0009I: raspberrypi: V0.6.6 (7989828) started at Sat 26 Dec 2020 06:36:40 PM EST.
--- RBK0031I: Checking whether a new version of is available.
--- RBK0151I: Using backuppath /home/pi/windows with partition type cifs.
!!! RBK0157W: No services to stop.
--- RBK0085I: Backup of type dd started. Please be patient.
7948+1 records in
7948+1 records out
7948206080 bytes (7.9 GB, 7.4 GiB) copied, 733.158 s, 10.8 MB/s
--- RBK0078I: Backup time: 00:12:14.
--- RBK0159I: 3 backups kept for dd backup type. Please be patient.
--- RBK0033I: Please wait until cleanup has finished.
--- RBK0049I: Messages saved in /home/pi/windows/raspberrypi/raspberrypi-dd-backup-20201226-183640/raspiBackup.msg.
--- RBK0026I: Debug logfile saved in /home/pi/windows/raspberrypi/raspberrypi-dd-backup-20201226-183640/raspiBackup.log.
--- RBK0010I: raspberrypi: V0.6.6 (7989828) stopped at Sat 26 Dec 2020 06:49:03 PM EST with rc 0.
--- RBK0017I: Backup finished successfully.

(5) Check folder rpi-clone on Windows computer


(6) Verify that backup is OK
- Write the backup image on Windows computer on a SPARE microSD card.
- Shutdown RPi and slip-out its microSD card.
- Slip-in the spare microSD card (on which you have written tthe backup image.
- Power up and verify that the backup image is OK.

Last edited: