I've hijacked a pretty neat backup script from the internet but somewhere along the lines there is something like this going on
DIRS="/home/ /var/www/html /etc"
tar -czf /backup/file.tar.gz "${DIRS}"
Which happens to work fine on my machine but on my server it appears to think it's a single path and tells me it does not exist:
/bin/tar: /home/ /var/www/html /etc: Cannot stat: No such file or directory
/bin/tar: Exiting with failure status due to previous errors
tar version locally is 1.29 while server is 1.28
What's the proper way to supply the directories to tar separately from that variable?