Closed koloner closed 7 months ago
In this case create 2 backups
One with the data ignoring both tables and one backup getting the structure of the 2 tables :)
Hello, thank you for your help, but I still have a problem, if I use this
{
"verbose": true,
"logging": [
{
"type": "json",
"target": "backup/json.log"
}
],
"backups": [
{
"name": "MyDatabase",
"source": {
"type": "mysqldump",
"options": {
"databases":"****",
"user":"****",
"password":"****",
"ignoreTables":"tabel"
}
},
"target": {
"dirname": "backup",
"filename": "mysql-%Y%m%d-%H%i.sql",
"compress": "bzip2"
}
}
]
}
It gives me an empty output without any backup
If I tell it with "ignoreTables", it takes all of them
Are you using the database prefixes for your tables?
What should happen is, that if you configure it in one backup
that phpbu
will still execute two mysqldump
commands.
You can check if you add the --debug
option to your execution.
phpbu --debug
My example config looks like this and it seems to work.
<backup>
<source type="mysqldump">
<option name="filePerTable" value="false" />
<option name="user" value="root" />
<option name="password" value="" />
<option name="databases" value="db1,db2" />
<option name="structureOnly" value="db2.cache-table" />
</source>
<target dirname="backup/mysql" filename="mysql-%Y%m%d-%H%i.sql" compress="bzip2" />
<check type="sizemin" value="10MB"/>
<cleanup type="Capacity">
<option name="size" value="100M"/>
</cleanup>
</backup>
hi i am use this config.json
But the settings are not applied and in this case it only gives the structure of the database. I want to give the whole database and those two tables give only the structure.