Use the DB_HOST parameter on wp-config to run mysqldump database & disable COMPRESSION for HomeDirectory & limit backup to certain sub-directories and files #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi. Thanks for this extremely simple and useful script. I modified 2 lines on the script to be able to use the DB_HOST parameter defined on wp-config.php 😉
Indeed, i also needed to add some way to define a list of ONLY-INCLUDED sub-directories and files when backing up the Home directory. Because my subdomains are stored on sub-directories of the main domain name (is a default setting on my hosting) so... i need a way to exclude such directories when backing up the main WP site. Well, even is usual to have another directories not used by WP... so i would like to define a list of EXCLUDED directories.
Also, one of my WP sites has a Home Directory VERY HEAVY (about 7.5Gb of photos and videos) and then i choosed to add the option in the profile of NOT-USE COMPRESSED-TAR files. When you set this parameter then the result are 2 files per daily backup of a site: 1) db.sql.gz + 2) FILES.tar
The save of time is almost 10 times comparing to use compressed TAR files! And the size of the backup is not more bigger than 20-35% So at least in my case i prefer be faster and heavier than slower and smaller.
Cheers!
Sergi