billw2 / rpi-clone

A shell script to clone a booted disk.
BSD 3-Clause "New" or "Revised" License
2.49k stars 327 forks source link

Excluding a data directory from the clone #104

Closed eddiem5 closed 3 years ago

eddiem5 commented 3 years ago

I am familiar with rsync but having trouble figuring out how to exclude a directory tree...

In the / (root), I have a directory /media/pi/AuraPro250GB which has a number of at a files in it that I wanted to exclude from the clone.. The booted drive is 256GB and the backup or clone is 32GB.

For the life of me, I can't figure out how to do so.. I went into the script and where it says --exclude 'lost+found/*' \

I added a new line following it that was --exclude 'media/*' \

or

--exclude 'AuraPro250GB/*' \

Can anyone help me, please?