Page 1 of 1
Feature request: database backup
Posted: 12 May 2005, 18:09
by RobLewis
Could Mantis' "Manage" panel have an option to back up the MySQL database?
Posted: 12 May 2005, 22:15
by thraxisp
It could, but the files might be huge. My test database with embedded files is about 32M.
I use a cron task that runs "mysqldump mantis > ../test.dump". You can also use file rotation with this method as it's automatic.
Posted: 09 Mar 2006, 21:47
by vboctor
I was against implementing this feature, since it is not a core feature and can easily be done using phpMyAdmin or MySQL directly.
However, if someone contributes a script that does this for ideally all supported DBMSes, I would be willing to include it in the Mantis core. If not all databases are supported, then we can disable this option for the non-supported db types.
I can see that this option can be convenient for users with hosted solutions. However, it can be a security risk if it is not secured properly.
It will be more practical if the scripts supports gz or zip compression, and obviously it will be more usable for users who have the attachments outside of the database.
Users must always remember that they also need to backup their attachments.
Regards,
Victor
MantisConnect
http://www.futureware.biz/mantisconnect/
Backup bd
Posted: 06 Jun 2006, 09:49
by asupport
Hi, I use a php script from Pascal Casenove (PHPMySQLBackup that can be found at
http://www.comscripts.com)
This adaptation needs no Mantis's code modification, so you can upgrade without loose your custom work!
To store my custom files, I have created a directory 'custom_files', under Mantis intall dir!
So I changed the code of the backup script to use Mantis's variables:
Added line in backup script :
require_once $Path_to_Mantis\include_inc.php # (that contents infos for database)
Modified lines in backup script
$host=$g_hostname;
$base=$g_database_name;
$login=$g_db_username;
$password=$g_db_password;
Finaly, I added in top_include_file.php a test to show a backup button (link to backup script) only if user_access_level = 90 (administrator)
Enjoy!
Paul
Backup
Posted: 08 Feb 2007, 00:34
by lpantos
Quote
I was against implementing this feature, since it is not a core feature and can easily be done using phpMyAdmin or MySQL directly.
Quote
Could I please get instructions on how to backup my database?