Removing registrant data - GDPR and saving space

  • OTWD
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
10 months 4 weeks ago #158404 by OTWD
Hi Tuan,
Is there an option now to delete users automatically from events after X number of years?
This is an important aspect of GDPR policy.
Also I am using the certificate feature and this directory is getting huge with such a history of certs.
Would you know a cron script that could remove pdf certs older than a certain date from the /media/com_eventbooking/certificates directory?
This could make a huge difference to servers as they are not backing up old files which shouldnt really be there due to GDPR.
I appreciate your attention to this matter as it really does affect everyone who is a long term user of your system.
Thanks
 

Success consists of going from failure to failure without loss of enthusiasm.

Please Log in or Create an account to join the conversation.

  • OTWD
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
10 months 4 weeks ago #158406 by OTWD
As an alternative would it be possible to change the default certificate directory to e.g images/com_eventbooking/certificates
or public_html/certificates
That way it is easy to exclude that directory when making backups?

Success consists of going from failure to failure without loss of enthusiasm.

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
10 months 3 weeks ago #158417 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Removing registrant data - GDPR and saving space
Hello

Why the path could not be changed (for backup compatible purpose), I developed a tool to allow cleaning up PDF files (invoices, tickets, certificates). You can download latest package of Events Booking, upgrade it to your site. Then login to administrator area of your site and access to this URL

domain.com/administrator/index.php?optio...l.clean_up_pdf_files

(Replace domain.com/administrator/ with administrator URL of your site)

The system will then remove these PDF files. It does not affect the system because when the system needs it, it will re-generate the file itself

Tuan

Please Log in or Create an account to join the conversation.

  • OTWD
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
10 months 3 weeks ago #158420 by OTWD
Thanks that sounds like a good solution however when i ran it on the account I can still see all the pdfs in the certificate directory.
I changed the url as follows.
xxxx.ie/administrator/index.php?task=tool.clean_up_pdf_files&option=com_eventbooking
Joomla4
php8.1
Eb 4.4.5

Success consists of going from failure to failure without loss of enthusiasm.

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
10 months 3 weeks ago #158422 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Removing registrant data - GDPR and saving space
Hello

It could be because I forgot to upload the modified package to server. I just upload it again to make sure the latest code is on server

Could you please try again one more time? If it still does not work, better submit a support ticket so that I can check it directly on your site

Tuan

Please Log in or Create an account to join the conversation.

  • OTWD
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
10 months 3 weeks ago #158442 by OTWD
Ok that worked and it deleted 6400 pdf files! Gulp!
Did you say the system will regenerate the pdf if the file is requested?
Can this file be run from a cron job? (even though its accessible from administrator only)?

Success consists of going from failure to failure without loss of enthusiasm.

Please Log in or Create an account to join the conversation.

  • OTWD
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
10 months 3 weeks ago - 10 months 3 weeks ago #158445 by OTWD
I also wrote this cron job which kinda does the same thing and works well!

Min Hr D Mth Weekday
*      *     *    *     *

Command
find /home/myaccount/public_html/media/com_eventbooking/certificates -name "*.pdf" -type f -mtime +90 -exec rm -f {} \;

the mtime is delete any pdfs older than 90 days 

Success consists of going from failure to failure without loss of enthusiasm.
Last edit: 10 months 3 weeks ago by OTWD.

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
10 months 3 weeks ago #158446 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Removing registrant data - GDPR and saving space
Great. Thanks for sharing your con job. If you use invoices features, maybe making a similar cron job to delete the PDF invoices, too

All of these files will be re-generated on demand, so you don't have to worry that it is being deleted

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc