I wanted to use layman’s terms and allow people to easily backup their website without knowing what goes on behind the scenes, but since your wondering here it is:
1. When you activate the plugin the settings are registered through WordPress and you are prompted to configure it.
2. When you go to “Backup Site” in the dashboard menu, there is a big link that says “Generate Backup” When you click that it uses either exec, system or passthru to ask the server to generate a backup of the database using the details mentioned in the file wp-config.php .
3. The file created is stored in /alex-backups/ with a random file name that is saved, and you can choose to download or email this backup to yourself. additionally an “index.php” file is automatically placed in /alex-backups/ to throw out the possibility of directory browsing if it is enabled. the plugin “https://www.ads-software.com/extend/plugins/wordpress-file-backup/”(also authored by me) works exactly the same way except it creates a compressed version of your /wp-content/ directory.