I'm trying to create a script that mysqldumps all my databases, creating an individual .sql file for each database and combines the output into backup-DATE.tar.gz.I've gotten as far as being able to create the .sql backups, but the last hump I can't overcome due to my limited knowledge is how to combine all the .sql files into backup-DATE.tar.gz.This is what I have so far:mysql -N -u user -p'password' -e 'show databases' | while read dbname; do mysqldump --add-drop-table -u user -p'password' $dbname > /backuplocation/$dbname.sql; doneThis outputs all my databases into my backup location individually ie:/backuplocation/    /db1.sql    /db2.sql    /db3.sqlIs it possible to combine this output into backup-DATE.tar.gz with this strategy?Edited to better explain my goal:My goal is to run this script and get something like the following:/backuplocation/    /backup-DATE.tar.gz/        /db1.sql        /db2.sql        /db3.sqlInstead of this:/backuplocation/    /db1.sql    /db2.sql    /db3.sql
Combine the output of while loop into tar
centos;pipe;mysql