jorgeuos / DataExport

Export database or connect to your BI tools.
GNU General Public License v3.0
2 stars 0 forks source link

What are the requirements to export regularly (e.g. daily)? #3

Closed JayEn84 closed 5 months ago

JayEn84 commented 5 months ago

The plugin works for me when executed manually, but the automatic export to a foreign server (using sFTP) does not. What are the requirements to make it work, e.g. a cronjob?

(Thanks for providing this plugin btw, it's highly appreciated!)

jorgeuos commented 5 months ago

There's an option in the DataExport settings, if you go to Admin(Cog wheel) --> System --> General settings --> Data Export

And Select the Checkbox, Sync File to External Server. I'm assuming you did that already. And pre-filled all the settings. Screenshot 2024-04-08 at 13 07 41

Then it should sync every time a new dump is generated with the scheduled-tasks, if you have set up a ./console core:archive-job, you don't necessarily need to run it manually, It will automatically run when the core:archive process runs, one exception is if you added the --disable-scheduled-tasks flag to the command.

However, you may test the settings by running the following command:

$ ./console scheduled-tasks:run "Piwik\Plugins\DataExport\Tasks.databaseDumpTask"

Just make sure you have added all the needed configuration settings in the UI or in your config.ini.php file.

You can try to add the verbose flag -vvv for more log messages. If you encounter any bugs or issues, let me know and I'll take another look.

JayEn84 commented 5 months ago

Hey, this is awesome!

My customer did not install any cronjob, but I can already tell that your test command worked! I just installed the archive cronjob and -recheck in wo days whether the data export works.

(You might want to add the information from your reply to README.md, because it doesn't tell that this plugin can do auto exports at all.)

Also, thanks for your quick reply!

jorgeuos commented 5 months ago

Thanks for the info, I'll update the Readme.