My last write up about backing up to Google nearline with a script had a flaw I pointed out which was the single threaded nature and the slow process to backup a large dataset. Well wait no longer. (If you were waiting.) I’ve added pthread support to the script and an update is attached.

You will need to add pthread support to your PHP installation. This will also require ZTS support. Note that a lot of bundled PHP copies do not include ZTS support so you may have to download the source and compile it yourself. You will also probably want to look at bumping up the memory limit on your script execution in php.ini.

Lastly I added a new flag, -w which controls the number of workers. Default is 5 but the sky is your limit. Or until your machine falls over. Good luck!