jeff5656 Posted August 3, 2011 Share Posted August 3, 2011 Here's how I back up all databases and all tables. $creatBackup = "mysqldump -u ".$user." --password=".$password." --all-databases > ".$sqlFile; How would I run that and exclude certain tables in certain databases? lets say I want to exclude a table called test in database "testdb" and a table called "hello" from database "hellodb"? Link to comment https://forums.phpfreaks.com/topic/243744-backing-up-the-databases/ Share on other sites More sharing options...
requinix Posted August 3, 2011 Share Posted August 3, 2011 Try the --ignore-table option. Link to comment https://forums.phpfreaks.com/topic/243744-backing-up-the-databases/#findComment-1251485 Share on other sites More sharing options...
jeff5656 Posted August 3, 2011 Author Share Posted August 3, 2011 Would it be this? $creatBackup = "mysqldump -u ".$user." --password=".$password." --all-databases --ignore-table=database.table1 --ignore-table=database.table2 > ".$sqlFile; Just want to make sure i got the syntax down...not sure if I would keep the all database line in there... Link to comment https://forums.phpfreaks.com/topic/243744-backing-up-the-databases/#findComment-1251491 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.