June 2025
Beginner to intermediate
473 pages
13h 30m
English
In Chapter 15, Section 15.2, I introduced you to a script that stores backups of a MySQL server database and web server directory in a local directory. With just a little effort, you can improve this script to compress the local files first and then upload them to an AWS bucket. Because the script is quite short, I have printed the entire code again here. Let me also briefly point out a few special features:
The encryption commands are wrapped in functions.
The functions are called in a pipe: mysqldump creates the backup, gzip compresses it, and mycrypt encrypts it. Only the result is saved in a file. This approach avoids the time-consuming creation of intermediate files.
Read now
Unlock full access