A backup function should be available across all the scripts so files can be backed up without adding logic related to backups around each call to said function.
Desirable things:
- Verify if the file to backup exists
- Copy it to the backup folder and check it was copied successfully
- Only create a backup if the file will be replaced by another file or if it is different from the file that will overwrite it
Ideally all the backed up files will be put together in a tarball before exiting the setup process.