Rsync Entire Raspberry Pi to Windows

This post includes a short snippet to copy your entire Raspberry Pi filesystem to Windows using Rsync.

Copying and Archiving particular directories

If you want to rsync specific directories rather than the entire Raspberry Pi I suggest you read my previous blog post.

It details how to backup a Raspberry Pi using Rsync and automatically archive and compress the backup.

However if you wish to quickly copy the entire filesystem for a short term backup read on.

Copying the whole Raspberry Pi filesystem

To copy the entire filesystem you can use the following rsync command.

rsync -av [email protected]:/* --exclude={"/dev/","/proc/","/sys/","/tmp/","/run/*","/lost+found"} .

Here -av is passed to rsync to run in verbose mode and print out the operations it is performing and to tell it to run in archive mode.

The files I want to copy are indicated by [email protected]:/* and mean that I am copying with the user pi from the Raspberry Pi with the IP address of 192.168.1.100. The final :/* means that all the files under the root of the filesystem will be copied.

The exclude flags specifically tell it to ignore the given list of directories. These are folders which do not contain useful files to back up and so are ignored.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.