wordpress-backup icon indicating copy to clipboard operation
wordpress-backup copied to clipboard

Use the DB_HOST parameter on wp-config to run mysqldump database & disable COMPRESSION for HomeDirectory & limit backup to certain sub-directories and files

Open caos30 opened this issue 2 years ago • 3 comments

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

caos30 avatar Oct 18 '22 03:10 caos30

Good idea(s). Do you use cPanel, btw?

pothi avatar Dec 02 '22 13:12 pothi

Nop. It's a tailored hosting panel, made by my hosting provider. Why do you ask for this?

caos30 avatar Dec 02 '22 16:12 caos30

Thanks for clarifying. Just curious about your use-case!

pothi avatar Dec 03 '22 02:12 pothi