Quote:
Originally Posted by Mr. Alex
Backup script:
Code:
rsync -vrpogt --delete --exclude=/all/.Trash-1000 --exclude=/all/lost+found /all /media/backup/ && rsync -vrpogt --delete --exclude=/home/alex/example.odt /home/alex /media/backup/ && echo -e '\e[1;34m>> All is done correctly <<'
After executing this script example.odt is copied to /media/backup/alex. What did I do wrong? I don't need it to be copied.
|
The --exclude option uses
relative paths. Rsync -vvvvvv will give you some insight into any issues you may have.
So if you have /tmp/test1 with blah and blah2 in it and want to copy to /tmp/test2/ AND if you do not want to copy blah2 you will do this:
Quote:
rsync -varh --exclude=blah2 /tmp/test1/ /tmp/test2/
|
In your case:
Code:
rsync -vrpogt --delete --exclude=.Trash-1000 --exclude=lost+found /all /media/backup/ && rsync -vrpogt --delete --exclude=example.odt /home/alex /media/backup/ && echo -e '\e[1;34m>> All is done correctly <<'
Also, -var will probably work for you instead of -vrpogt