- Posts: 67
- Thank you received: 2
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Automatic backup
- aukevann
- Topic Author
- Offline
- Senior Member
Less
More
7 years 2 weeks ago #149270
by aukevann
Automatic backup was created by aukevann
Hi,
Is there a way to automate backups of both the files and especially the database?
Best regards,
Auke
Is there a way to automate backups of both the files and especially the database?
Best regards,
Auke
The topic has been locked.
- gabrieljenik
- Offline
- Official LimeSurvey Partner
Less
More
- Posts: 272
- Thank you received: 45
7 years 2 weeks ago #149284
by gabrieljenik
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Checkout our Reporting Solutions and our plugin shop at www.encuesta.biz .
Replied by gabrieljenik on topic Automatic backup
Hi Aukevann,
Which files?
I could create a plugin for that if you want.
Thanks!
Which files?
I could create a plugin for that if you want.
Thanks!
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Checkout our Reporting Solutions and our plugin shop at www.encuesta.biz .
The topic has been locked.
- aukevann
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 67
- Thank you received: 2
7 years 2 weeks ago #149285
by aukevann
Replied by aukevann on topic Automatic backup
backup of the whole site, inclusief SQL database
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13910
- Thank you received: 2548
7 years 2 weeks ago #149338
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Automatic backup
For sql : more easy with mysql.
And maybe : better to do a sh script for this
I have different sheel script on my server :
- Some to do 'hard backup' of DB blog.shnoulle.net/Un-ptit-script-de-backup-mysql (in sql file)
- Some to copy DB in DB (with another name)
- Some tar backup of needed directory
And maybe : better to do a sh script for this
I have different sheel script on my server :
- Some to do 'hard backup' of DB blog.shnoulle.net/Un-ptit-script-de-backup-mysql (in sql file)
- Some to copy DB in DB (with another name)
- Some tar backup of needed directory
Code:
#!/bin/bash # Linux bin paths, change this if it can not be autodetected via which command MYSQL="$(which mysql)" MYSQLDUMP="$(which mysqldump)" GZIP="$(which gzip)" # Get hostname HOST="$(hostname)" # File to store current backup file FILE="" # Get all database list first , if you want to backup all DBS # DBS="$($MYSQL -Bse 'show databases')" # Store list of databases DBS="limesurvey limesurvey2 cms1 " # Get all database list first #DBS="$($MYSQL -Bse 'show databases')" echo "Backup of DBs" for db in $DBS do dbnew="zzbak_last_$db" $MYSQLDUMP --databases $db > $HOME/backupsql/$db.sql echo "DROP DATABASE IF EXISTS ${dbnew}" | $MYSQL echo "CREATE DATABASE ${dbnew}" | $MYSQL $MYSQL $dbnew < $HOME/backupsql/$db.sql done
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.