Advertisement
Guest User

Untitled

a guest
Aug 21st, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. <?php
  2.  
  3. $filename='database_backup_'.date('G_a_m_d_y').'.sql';
  4.  
  5. $result=exec('mysqldump database_name --password=your_pass --user=root --single-transaction >/var/backups/'.$filename,$output);
  6.  
  7. if($output==''){/* no output is good */}
  8. else {/* we have something to log the output here*/}
  9. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement