Closed coreation closed 12 years ago
Export : TDTAdmin/Export:
1) Will create TDT Resource dumps in the bin directory as 1 php file, which a user can then execute "php mydump.php" which will then add all the exported resource. parameters could be a package ( and a resource ) which will result in a dump of only 1 resource or every resource under a certain package.
Import: TDTAdmin/Import
You can ofcourse execute the php files yourself, which is pretty easy through a command line. Import will accept a parameter that links towards a dump (.php-file) which will then be executed.
Note that everything that goes by TDTAdmin will be done with authentication
All the dumps will be printed in raw "code" so the actual php code to add the resources will be returned. This looks intuitive, but what will we do when the printing of the resource ( if no resource or package is passed, it will export the entire datatank ) takes too long and the HTTP requests times out..... ?
Tested with package, no package, and package/resource as parameters passed. Works like a charm !! Had to figure out some extra's on curl_exec and options so that if you execute the raw php code that is returned from the resource you will get this type of result:
The addition of ..... has failed/succeed. dump of all of the response header
The addition of ...... etc.
This will result in a tight feedback mechanism so that user can check out what resources failed and what the error was.
Not entirely sure if we really need an import resource as well, because the export is just in pure php code, so the user can execute it, what the import would do is exactly the same, but with that issue that it would have to have rights to execute the file. So I'm seeing the import as merely something with quite a low priority.
Just like phpmyadmin has a function to export and import bulks of datatables and bases, we should have a similar system which allows people to transfer their back-end from one TDT to another TDT. This will help getting people to submit and use a newer version of TDT, which cannot be updated without a complete re-install.