backup database

pre{border:none;background-color:#f4f3d7;padding:1em;-moz-border-radius:10px}

<?php
exec("mysqldump -uDBUSER -pPASSWORD DBNAME > DBNAME.sql");
exec("tar -czvf BACKUP.tar.gz .");
print "Done";