Backup MySQL DB with SVN? [closed] - mysql

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have a MySQL DB which should be versioned with SVN. I dont want the full DB, only the structure and selected tables. I searched the net and found some information, but nothing seems to really work in a reliable way. Any experience or hints?
Thanks :)

Check out this script which automates the process, allowing for specific selection of databases and exclusion of tables [disclaimer I am the author] - http://mysql-svn-backup.redant.com.au/

Use mysqldump to export the data you want into a file and put this into SVN. Using cron, you can automize this to run in specific timeslots

The question is: what exactly do you want to version, and why?
I propose you version an SQL file that you can import to create your database. Any tool can be used to create this SQL file (basic tool: mysqldump), which you can then save into your SVN repository. You will be able to track new tables being created by comparing revisions of SQL files.
You can automate this process by adding a CRON job to automatically dump and commit the file every 2 hours.

Related

How to automate update process between 2 databases [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm quite new to mysql and in database management in general....
I've to solve this scenario:
In the development stage the web site has the database in the local machine and some tables are dedicated to contain information data used by the application ,during the development the records of that tables grow and when we move to production we want to update the production server with the new data...
Can someone advise the best practice to automate the update process from the local to the production database.
Thanks in advance
The road to doing this successfully is to have each database know how far it has migrated.
You should absolute use something like Liquibase or Flyway to do it. If you have a simple database environment these two will work. Both of these will track changes in version files that the database keep track of.
If you need more complexity, like in a sharded environment, you probably need to roll your own tool for this.
You should mention different .sql files for each environment like,
development.sql,
staging.sql,
production.sql
And you need to write shellscript to execute this script while deployment process.
Also, you need to maintain one constant to get current environment.

Continuous Backup of Mediawiki [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am administrating mediawiki for my organisation. We use it as our Intranet site. It has accumulated a huge organisational knowledge base. I have make sure that mediawiki is always up and running. Knowledge base always backed up.
Is there a way to take continuous back of mediawiki files and databases? My mediawiki is hosted on LAMPP server with Debian OS.
I am trying to find a way to automate backup process.
It depends on what you mean by "continuous". If you want a copy of the database running that is always the same as the main database, you will need to set up "replication" - see http://dev.mysql.com/doc/refman/5.1/en/replication.html for how to do that.
If you want a database backup that is relatively current, then running mysqldump every hour or so is a pretty good solution.
You'll need to backup the files separately, because they are in your file system not the database. Look at running rsync every hour or so.
Why do you want a "continuous" backup and how would you use it? Do either of these approaches answer your question?

Applications or Ways to Import MySQL Database with Relations etc..? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I'm trying to edit my MySQL database after a long time of taking a rest, and I'm pretty confused what's what. Do you know of any application or a way in which I could import or merge my db on server into an application that will not only allow me to work with the database on my local pc, but be able to view the structure and relations visually?
Thank you :)))
You can use the MySQL Workbench [1]. There you can generate a ERD (=Model) from your remote and/or local MySql Database. Furthermore you can manage your user accounts, edit tables and datas and much much more...
[1]... http://www.mysql.com/products/workbench/
Head on over here http://dev.mysql.com/downloads/installer/
The Mysql Workbench included in the installer should help

ejabberd mysql script bug? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Hihi, not sure if i am just plain dumb.. Have installed ejabberd on amazon ec2 and recently managed to switch to use mysql based on the guide: https://support.process-one.net/doc/display/MESSENGER/Using+ejabberd+with+MySQL+native+driver
I have an issue now after switching to mysql db, not able to add roster to my user, and the log shows that the table rosterusers does not exist.
And now I am confusing, I grabbed the mysql.sql db schema from ejabberd github at https://github.com/processone/ejabberd/blob/master/src/odbc/mysql.sql, and found that
there isn't any rosterusers table to be created, instead, it creates a table called rosteritem.
there isn't any table called rostergroups, but rostergroup (without 's'). After some googling around, i think rostergroups should be the correct naming.
Is there anyone here knows is this a bug in the mysql schema, or i am missing something?
Thanks in advance!
I have not gotten any feedback regarding this question, but eventually, I have manually changed some of the table schema created from the mysql.sql script to matched the one from mssql.sql.
Everything works fine thereafter!
:)

Two questions about backing up your website (mysql and files) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
So the only method i like using and think is the simplest to use is mysqldump to backup mysql databases. Right now, im using phpmyadmin to backup the tables. Is there any way i can code a script that does it automatically (preferably everyday).
And how do i back up files exactly on my server. I have an images file that i need to back up. I'm not sure exactly how to go about backing those up.
Of course -- use MySQL Dumper. You can automatically backup your databases to another host if you like!
Features
Send dumpfiles via FTP to up to 3 different server. This is also working using the multipart feature.
Automatic file-deletion: set your own rules to delete old backups. Specify the number of backups you want to hold and let MySQLDumper automatically delete the older ones to save server webspace.
MySQLDumper can do Multipart-Backups. That means: it can automatically split the dumpfile if it gets bigger than your chosen size. When you want to restore a backup and choose the wrong part - it doesn' matter: MySQLDumper will notice that and will get the correct startfile automatically.
Security: MySQLDumper can generate a .htaccess-file to protect itself and all of your backup-files
Good reading resource for alternatives
10 Ways to Automatically & Manually Backup MySQL Database
Since Gary answered your first question, I'll answer your second.
For backing up the server:
I'm assuming you are talking about your web applications and the images contained in folders used by those applications. Source control will work for this. Set up a Subversion server or something like it.
http://subversion.tigris.org/
Hope this helps. Good luck.