I'm trying to make a full filesystem backup of a server through rsync, following this guide.I'm using the following command:rsync -aAXH --progress --delete --stats --exclude={\    /dev/*,\    /proc/*,\    /sys/*,\    /tmp/*,\    /run/*,\    /mnt/*,\    /media/*,\    /lost+found}\    /* \    newserver:/mnt/oldserver-backupHowever, it still backs up the /media/x folders, causing there to not be enough space in the target. How can this be corrected?
Rsync'ing system, exclude doesn't seem to work
shell;rsync
The --exclude={x,y,z} construct only works in bash and needs to be on one line without spaces, only then can bash expand this correctly.I'd suggest putting the list in a separate file and using --exclude-from=file, or doing as megahallon suggests and repeat the --exclude= option part yourself.Note also that you usually do NOT want /* as your source; let rsync take care of recursing, so just specify /. that way dot files in / also get copied. I also always add a trailing slash to the destination directory to prevent surprises; a good habit to get into.