CGI Scripts (Perl) - Nginx and Centos


Well-known member
Hello all,
Bit of a tricky thing to do this seems, I need to enable CGI scripts / PERL for mysqldumper so I can enable automatic, scheduled backups.
I use Sypex Dumper also, have used it for months now - but can't figure out the cron to schedule it?

If anyone knows of course how to set the cron script for Sypex that would be handy, but all I see on the listings is how to use it in C-panel.

So I have used mysqldumper before and wanted to use it and php scripts run fine, but in order to run the cron perl script I need to use/enable cgi.
I've read here lots of issues and security issues with people getting cgi running on Nginx, so was wondering if anyone could offer any tips and advice really.

Thanks in advance
Okay I have some things working, don't know if anyone can help - but I cannot get pearl/cgi scripts running.
Am using CentOS and Nginx.
I followed this guide, but adjusted it to my needs accordingly (such as directory) but instead serving the rendered page, it sill gives me a file to download.

I need to either adjust mysqldumper to run Cron via perl and cgi
Get Sypex Dumper set up on a cron job.
well if you become a Centmin Mod premium member, you get access to = super charged mysql database backup script with support for local and remote backups to Amazon S3 and up to 3 separate ftp remote backup locations :D

Key Features

As at Oct 24, 2015:
  • MySQL database and schema only backups + /etc/my.cnf backup
  • Multi-threaded parallel compression default pigz with options for lbzip2, pbzip2 and px. For single cpu core servers, falls back from pigz to gzip.
  • Amazon S3 Storage support and option to define one of three S3 storage classes (Standard, Standard – IA, and Glacier) to control your Amazon S3 storage costs and Amazon S3 availability and durability. Disabled by default.
  • Remote FTP/SFTP support - can define up to 3 separate FTP/SFTP locations to remotely transfer your backups for added redundancy and data safeguard.Disabled by default.
  • Backup Retention threshold set in days. Older than XX days deletion routine for both local backups and remote FTP/SFTP backups. Amazon S3 you can setup your own S3 bucket's lifecycle management in AWS Console.
  • Email and mobile notification options on backup runs. Disabled by default.
  • Persistent db-config.ini separate file option so custom settings survive script updates.
  • Full backup run logging to log file for diagnostic troubleshooting or historic records
example pushover mobile device notifications

Last edited:
Haha nothing like plugging yourself Mr @eva2000 :D
I will think about it.... :censored:;)

I currently do run offsite backups but need the perl running. I'll crack it, practice and reading lots of papers seems to be the way forward for all these. ;)
As I said above, I use mysqldumper and find that brilliant tbh. I've used it now for about 5 years? But of course this time it's just getting things right on the server, which I may leave now.
Sypex Dumper too but no cron.

I am still trying to get my head around the centmin mod and Nginx - so I will be considering it.
No offence meant here at all my friend, but if I were to upgrade all it would be, for me at least.. is this option.
I'm already on your community site, joined today - thought best had, I've been hovering long enough :D
But yeah the upgrade would be for this script/server/backup access only, the rest I wouldn't need.

Yeah I saw some of your written public ones and was intrigued. I also have been reading tutorials on your site with regards to CGI - but Floren also posted some things and well, I was left a bit confused after that (secuirty and server blocks) so didn't carry out your guide suggestions.
I will look don't worry :D
It's on this I'm having issues, I don't think I can get mysqldumper perl script running so thought I'd fiddle with Sypex Cron;
/usr/bin/php /home/site/public_html/sxd/index.php -j=job_name

Will check the DO tutorial now, thank you! What threw me is we have several folders and scripts for the cron entries;

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly

Thank you again - appreciated (y) :)
Top Bottom