SkyRSS Reader : développement en cours

J’ai un peu travaillé sur SkyRSS Reader aujourd’hui et ma TODO list semble fondre à vue d’oeil :

  • add an easy setup script and a commented config file
  • create the admin section to manage feeds
  • restrict the number of news per feed

En gros, il faut que j’arrive à trouver comment limiter le nombre d’entrées d’un flux RSS et pour l’instant, ce n’est pas encore gagné. Lorsque j’aurai trouvé cela il ne me restera plus qu’à adapter un système de cache afin de ne pas saturer le serveur sur lequel le script sera installé… et oui, autant penser à tout ça dès le début, cela nous fera gagner du temps par la suite !

EDIT! @ 21h40 : et hop, voilà je viens de trouver comment limiter le nombre d’entrées par flux. Finalement cela tient en 4 lignes de code, rien de bien méchant. Il ne me reste plus que le script d’installation que je vais peut-être finir ce soir si j’ai le temps…

Backup all your MySQL databases with one line of cron photo

Backup your MySQL databases with a one-liner crontab

As I’ve lost some data in my MySQL database recently, I’ve decided to make backups more regularly and I’ve been playing with Cron in Cpanel in order to set up automatic backups of all my databases.

Here’s a short how-to which might help some people out :

Go to Cpanel > Cron Jobs

Select between Standard or Advanced, that’s up to you !

In the command field, type this :

date=`date -I`; mysqldump -u yourusername -p yourpassword --all-databases > /home/LOGIN/backups/xbackup_$date.sql; gzip /home/LOGIN/backups/xbackup_$date.sqlCode language: JavaScript (javascript)

Now let’s see what this all means : the date line formats the date so that we can append it to our backup filename.

We then ask mysql to dump all databases into /home/LOGIN/public_html/backups/xbackup_$date.sql, where :

  • LOGIN is your Cpanel name, using “yourusername” as user (-u) and “yourpassword” as the password (-p).

Notice the date variable inserted in the filename. Finally our SQL file is gzipped using the gzip directive.

You now have to set your backup frequency. And relax !

Notes :

1. I’ve created a user “backup” with all privileges in Cpanel > MySQL databases and associated him with all my databases so that I can backup everything in one single file with just one line of cron.

2. Protect your backup directory so that people cannot download the whole of you SQL data. You can enable directory protection with Cpanel > Password protect directories > *select your backup directory* > *check the box and enter a username/password* > *validate*.

That’s it ! Have fun, you should never have to worry about your databases’ backups again ;-)