Difference between revisions of "Anarchopedia:Technic"

From Anarchopedia
Jump to: navigation, search
 
m
Line 1: Line 1:
 +
*[[Anarchopedia:en:administration|administration]]
 +
 +
 
==MySQL dumps==
 
==MySQL dumps==
  

Revision as of 17:31, 15 May 2006


MySQL dumps

Database dumps are produced by script:

 #!/usr/bin/perl -w
 use POSIX qw(strftime);
 $date = strftime "%Y%m%d%H%M", gmtime;
 print "mysqldump --opt -uusername -ppassword anarchopedia cur old > anarchopedia-".$date.".sql\n";
 print "bzip2 anarchopedia-".$date.".sql\n";
 print "mv anarchopedia-".$date.".sql.bz2 /srv/www/virtual/org.anarchopedia/htdocs/db/\n";
 print "chmod a+r /srv/www/virtual/org.anarchopedia/htdocs/db/anarchopedia-".$date.".sql.bz2\n";


Crontab job:

 0  1    * * *   root    /srv/system/bin/ap-mysqldump.pl | sh

(MySQL dumps are generating every day at 01:00 CDT.)