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

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.

Related

Where are the actual .db files stored in wordpress [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 4 years ago.
Improve this question
I am trying to learn more about wordpress and am bothered with this question.
I hosted my site on bluehost and decided to make a backup. I made a copy of public_html and downloaded it, I was later told by the support that I also need to export the database. That got me thinking where the actual data is located, if not in the public_html directory, where are the actual files that contains all the tables etc?
I asked the support but didn't get a good answer. Surely, all the data must be stored in some files somewhere, so shouldn't I be able to find them, download them, and not have to use an interface like PhpMyAdmin?
On BlueHost ask them to give you an export of SQL File of your database.
If you go the management panel and find MySQL (Database Software) where WordPress database files are stored.
But its best to install plugins like Wordpress DB backup in your WordPress and then use that plugin to download a backup of the database file. That may be easier for you considering you are a non-technical user.

Is it OK to copy DB files from one MySQL server to another? [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 7 years ago.
Improve this question
I have two identically configured MySQL 5.6.10 servers and needed to move the data files fast from one to the other. Is this an OK procedure?
Here is what I did:
1) Shut down both servers
2) Moved all the files from one box to the other (DATA is on a separate drive on both machines)
3) Turned the second server on
4) Connected it back to the app server
It took about 5 minutes to move all files (~50GB) and all seems to work. I just wonder if I missed anything?
Thanks much for your feedback.
If both the server versions are same, then I think, it's perfectly fine, not just OK, as I have done the same many times, without any data loss, but this method comes with cost:
You have to shut down mysql server (which is not good, if it's a production server)
You have to make sure the permission of data (mysql) directory is same as the previous one.
You will have to monitor the mysql_error log while starting the second server.
You can use mysqldump, but if you don't want to, then you can use Mysql Workbench's migration wizard, it really takes care of everything.
A much safer and recommended way would be Database Backup And Recovery.
Do a full backup from server1 and restore it to server2. Later then on, you can go for a differential backup.

Restore MySQL Database from another server, will it affect current databases? [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 8 years ago.
Improve this question
Morning, we have 8 databases on our live server. I have created a new one on our test/development server. In MySQL Administrator I've backed up this new database to an SQL file, this file is on the new server. If I use "restore" in MySQL Administrator to create this database, will it affect the other databases that are there or will they carry on working as normal?
Is there a better way to do this?
The new DB is only a few k in size, the others contain many years of info and data and are huge. Any help appreciated
No, it won't. As you said that your DB is small it will not affect at all the other DB. It would if it was bigger, most probably it would slow dow your server a bit during the import (if it was bigger, huge to be precise), after the import the database will work normally. Of course it will share resource to keep one more instance working. And with time, it will make some difference in performance (depending on how big this DB grow). But you will have to be more concerned with hardware capabilities then the database itself.
Of course, I assume that when you say database you are saying about a new instance on your database.

phpMyAdmin Designer with just 1 database. Alternatives? [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
I bought a 1and1.es (Spain) Starter hosting plan for a small project we are starting. It only allows one database. I never imagined that to enable phpMyAdmin Designer (the graphical tab where you set relations between tables) you'd need to create another database. Of course, when I try to, I get an "access denied" error.
So, assuming I can't use phpMyAdmin, I haven't been able to find the right term to look for an alternative MySQL manager that has some kind of graphical relation creator. I just converted the tables to InnoDB and I have Relation View, but a totally-unskilled team has to work with it so we need visuals.
PS: I just saw I can pay 1$/month and have another database, so I might consider it (it'w low price, but feels useless having a 1GB database just for a silly database. I don't get why phpMyAdmin needs another database just for that).
Thank you
Why do you imagine that the phpMyAdmin configuration storage needs a separate database?
According to http://docs.phpmyadmin.net/en/latest/setup.html#phpmyadmin-configuration-storage,
"you need to create a set of special tables. Those tables can be located in your own database,"...

which is better saving images in folders with paperclip or using database to save images [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I have a question in my mind, that is it preferable to keep images in database directly using datatypes like blob,binary etc. or the way paperclip stores images by maintaining folder structure and keeping only the path in database is the standard one.
Storing pictures in the database helps you keeping your data synchronized (what if by any chance a folder name is changed manually?). Then it would save you the small effort to remember to back up data outside the database itself.
On the other side retrieving an image from a database is much slower than doing it from the file system, and database storage space I seem to remember is more expensive on a web server.
Said that, it's just a matter of choice. In case you decide to go for the database, there is a gem helping you to do that 'paperclip_database'.
There are a few advantages and disadvantages.
Advantages
Easy to protect the referential integrity. No discrepancy between image (path) saved in DB and the real image saved at the filesystem.
Database Backup also contains images. But consider you have to backup the application data nevertheless. (So this is not a good argument)
Easier rights management
Disadvantages
Performance issues. Every image has to be loaded from the database. The more images affected the more weight this argument should get.
Browser-Cache / Checking if an image has changed (If-modified-Since) not working anymore.
(But you could implement a checking yourself)
(No complete list)
My Conclution
On small sites with less traffic and images it's okay to store images in the database. On bigger sites I wouldn't do that.