Quantcast
Channel: Dariusz on Software Quality » sh
Viewing all articles
Browse latest Browse all 9

Ignore sockets during tar backup

$
0
0

If you want to skip error sockets-related code during backup of whole filesystem you will be surprised there’s no –ignore-sockets switch. But there’s elegant method to to that:

cd /
sudo find . -type s > /tmp/sockets.lst
if sudo tar zcvpf $TMP_FILE --one-file-system --exclude-from=/tmp/sockets.lst -C / .
then
    echo backup OK
fi

Viewing all articles
Browse latest Browse all 9

Trending Articles