4

So I am trying to make a basic database backup script. It uses mysqldump and puts the data in a .sql file, which is then uploaded to dropbox.

My question is, how can I make sure the dump is finished before the upload starts?

mysqldump -u root -p<password> <database> > $DBFILE
dropbox_uploader.sh upload $DBFILE

Will it automatically wait for the dump to end, or do I need to make a while loop? If the latter is the case, how do you go about that?

1 Answer 1

2

In general, programs under *nix wait until completion before returning (though there are exceptions to this, mostly GUI applications). mysqldump follows this, therefore you do not have to do anything.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.