Cheers! I have added the script to the devel_scripts/ directory in the relax base directory. I will also set this up as a cronjob on a number of machines to dump every day sometime during the night. If the load on the server is too high, I can stagger the dumping or set it to weekly dumping. Regards, Edward On 16 July 2013 17:40, Troels Emtekær Linnet <tlinnet@xxxxxxxxx> wrote:
Dear relax developers and users. I hereby send a bash script for a mysql dump of the newly create relax wiki. Thereby the mysql database can easily be created anywhere else. To prevent abuse of the webpage hosting service, I need to keep the password secret. The password is shared with Edward d'Auvergne. I suggest a setup, where Edward run a cronjob a his infrastructure, and expose the files to: http://download.gna.org/relax/wiki/mysqldump I am looking into a FTP dump as well. Best Troels Linnet ---------------------- #!/bin/bash # -*- coding: UTF-8 -*- # Script for dumping MySQL base automatically using cron. # exec test exec_test () { [ $? -eq 0 ] && echo "-- Command successfully executed" || echo "-- Command failed; exit 1" } # Filenames dbhost="mysql13.gigahost.dk" # The following three fields are kept secret, to prevent abuse. # Please contact Troels Linnet at: tlinnet _at_ gmail dot com, for access. dbuser="secret" dbpwd="secret" dbname="secret_nmrrelax" backupfolder="$HOME/backup/mysqldump" mkdir -p $backupfolder mydate=`date '+%Y%m%d_%H%M'` mytime=`date '+%T %Y%m%d'` filename1="${backupfolder}/${dbname}_${mydate}.bck.sql" # Logging exec 3>&1 4>&2 trap 'exec 2>&4 1>&3' 0 1 2 3 exec 1>>${backupfolder}/${dbname}.log 2>&1 # Everything below will go to the log file dump_base () { echo "###########################" echo "STARTING on: $mytime" echo "Base dumping..." mysqldump --opt --host=$dbhost --user=$dbuser --password=$dbpwd $dbname > $filename1 } compress_base () { echo "Compressing base..." gzip -f9 $filename1 # rm filename1 } dump_base ; exec_test compress_base ; exec_test echo "Done, quit!" _______________________________________________ relax (http://www.nmr-relax.com) This is the relax-devel mailing list relax-devel@xxxxxxx To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-devel