I am maintaining an installation that has a lot of files in the storage folder. Since this is in active use, I create backups every night. Once every so often I delete old backups. Also, I altered the backup script so that the storage folder is not backupped, since this will cause massive server load and take up space. In stead, I manually backup the storage folder. In my effort to move to an installation that can be easily updated without loosing the functionality I need, I'd like to offer to create a branch where I extend the backup settings screen to choose the folders to backup, and maybe even auto remove backups that are older than X days. Now my question is, is there any desire to incorporate this into the core codebase? If there is, I can start making this. If there is not, I'll spare myself the effort.
Creating a user select for backup folders
|
07-04-2016, 04:29 PM
This is something I would accept, I think it is useful as many installs have the same problem and most end up disabling the internal backups and using an external backup system.
We now have two backup systems in coreBOS so you will have to adapt both: https://github.com/tsolucio/corebos/blob...up.php#L29 https://github.com/tsolucio/corebos/blob...ervice#L58 and then modify ExternalBackup.service and the backup() method to call a "cleanup old backups" method
Joe
TSolucio
07-04-2016, 04:38 PM
Following up on our conversation about Business Maps. To do what you are proposing above you will have to modify the backup configuration screen to show a list of the directories that require copying (or at least the storage directory) with a checkbox so the user can select if they want to copy it or not, and another input box with the days to delete the old backups (at least). Then you need to modify the database to save those those values somewhere, or maybe write them directly into a file somewhere....
This is a big part of the time you are going to spend creating the change and this is where business mappings come to help. You create a new type, you create a class that parses the XML file and returns the values. The admin user just has to create the XML record to adapt the process to his needs. If you really have time to do the interface you can now enhance the Business mapping and create the XML in a GUI. I could imagine something like this: Code: <map> Note, I just invented the above off the top of my head so use with care :-)
Joe
TSolucio
Great, thanks. First thing to do is create a roadmap, which leads to the first question: The preferences a user sets should be stored somewhere. Which database table would be best suited for this, if any? I'm a little familiar with the database structure, but ont enough to answer this question. Or would the creation of a new table be best for this?
Didn't see your last reply before I posted my last before this, will read. I'll setup a test server (can't update my own because I'm working on the theme there, including the updated files regarding CSS and JS) and test the module to get a better understanding of the Business Maps. Basically I have to understand which events it responds to. Let me start a thread on the questions I have from the docs. (07-04-2016, 04:29 PM)joebordes Wrote: If you really have time to do the interface you can now enhance the Business mapping and create the XML in a GUI. So basically, create a record in the 'vtiger_cbmap' table and alter the contents of the record through a GUI? |
« Next Oldest | Next Newest »
|
Users browsing this thread: 1 Guest(s)