2. The script asks for the corresponding MySQL password for security reasons (the password is not echoed or saved anywhere – as you would expect on a Unix systems)
3. The output dir can also be specified from the command line
4. Support for gzipped output files (optional)
Usage
Download the dump-all-databases.sh. Make it executable using chmod +x dump-all-databases.sh.Run it:
./dump-all-databases.sh -u user -o my_backup_dir -zThe command line options are the following:
- -u – the MySQL user
- -o – output dir (optional, if not specified the dump files will be placed in current directory)
- -z – enables the gzipped output (optional)
Download
dump-all-databases.shSystem requirements
Unix/Linux system with mysql and mysqldump installed, for gzipped output gzip is also required.Resources: http://carrotplant.com