Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: smal82 on June 18, 2024, 04:12:48 AM

Title: Backup to Dropbox
Post by: smal82 on June 18, 2024, 04:12:48 AM
Hi.

I create a script that backs up the site and database and then uploads the zip file to a specific folder on Dropbox. Starting from the index.html file I would like to create a mod that allows me to integrate this script into the CURVE2 theme template. And if possible I would also like to create a cron that allows the user to choose when to run the backup.php file.
Title: Re: Backup to Dropbox
Post by: Steve on June 18, 2024, 07:08:54 AM
Are you asking for help in creating all this?
Title: Re: Backup to Dropbox
Post by: smal82 on June 18, 2024, 07:35:10 AM
Yes, I would like to understand how to create a mod. Maybe I'm in the wrong forum and I apologize if necessary. But trying to create the various modifications.xml, package-info.xml, Install_db.php and Uninstall_db.php files I think I'm not inserting the right things and my test forum gives me an error.

I also uploaded the script to Github, but since I cannot insert the link, I attach the zip file here.
Title: Re: Backup to Dropbox
Post by: Tyrsson on June 18, 2024, 08:15:39 AM
The simplest way forward would probably be to leverage League/Flysystem. I think they already support Dropbox but don't hold me to that.

You might want to review this information as well.

https://www.simplemachines.org/community/index.php?topic=299669.0

https://www.simplemachines.org/community/index.php?topic=299670.0

https://wiki.simplemachines.org/smf/Integration_hooks

You might also find this useful:
https://custom.simplemachines.org/index.php?mod=4321
Title: Re: Backup to Dropbox
Post by: Tyrsson on June 18, 2024, 08:17:36 AM
Quote from: smal82 on June 18, 2024, 07:35:10 AMI think I'm not inserting the right things and my test forum gives me an error.
What error are you getting? Just telling us it gives you an error is not real helpful.
Title: Re: Backup to Dropbox
Post by: smal82 on June 18, 2024, 08:36:33 AM
Quote from: Tyrsson on June 18, 2024, 08:17:36 AM
Quote from: smal82 on June 18, 2024, 07:35:10 AMI think I'm not inserting the right things and my test forum gives me an error.
What error are you getting? Just telling us it gives you an error is not real helpful.

Error parsing the change,

I probably didn't insert the code correctly in the modification.xml file.

Thanks for the links. Now I'll see if I can figure something out.