582358 (8) [Avatar] Offline
#1
tar czvf - --one-file-system / /usr /var \
--exclude=/home/andy/ | ssh username@10.0.3.141 \
"cat > /home/username/workstation-backup-Apr-10.tar.gz"


i think :
1.
tar czvf - --one-file-system / /usr /var \

it not only include /usr and /var partition, but it also include /, the root partition

2.
--exclude=/home/andy/

when using --exclude, in my example, i using rpi 3, so my code should be:
--exclude=/home/pi/

But when excute it, the message shows that it also include the directory(/home/pi/ in my example),then i try to solve this problem, and finally, i take off "/" on the far right, and my code become:
--exclude=/home/pi

and it worked! now it does not include that directory, so i think the command should be :
tar czvf - --one-file-system /usr /var \
--exclude=/home/andy | ssh username@10.0.3.141 \
"cat > /home/username/workstation-backup-Apr-10.tar.gz"


but i doesn't know the difference, hope this can help others, thanks!