Question
Four-lines script to make an immediate DB and document root zip backup
What do you think of my four-lines script to make an immediate DB and document root zip backup?
Any flaw you might find. Please inform me of it:
#!/bin/bash
mysqldump -u root -p --all-databases | zip ${drt}/db-$(date +\%F-\%T).zip
zip -r all_zipped-$(date +\%F-\%T).zip ${drt}/ -x "*/cache/*"
rm -rf ${drt}/db-$(date +\%F-\%T).zip
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×