Tag Info

New answers tagged


You could use the -r flag to tar to append a file to an existing archive. Since it's legal to append to an empty or non-existent archive, you could modify the looped instruction to be something like $MYSQLDUMP --force --opt --user=$MYSQL_USER -p$MYSQL_PASSWORD --databases $db > "$BACKUP_DIR/mysql/$db" tar rvf /path/to/tar.file "$BACKUP_DIR/mysql/$db" ...

Top 50 recent answers are included