Mysqldump In Ssh
Jan 24, 2008
If a friend of your's asked you what they should type in SSH to make a backup of a MySQL database so they would have it to restore if anything were to happen to their server (drive failure, DB corruption, etc etc).. what would you tell them to type in?
The reason I ask this is because doing my own research on the net on how to backup a mysql database in SSH has shown me there are 10 million ways of doing it, with all kinds of modifiers and so forth. Not having a good grasp on what these modifiers do, I am not sure what to use?
For instance, here is what I have been using:
mysqldump --opt -udb_username -p db_name > /home/username/thebackupfile.sql
View 4 Replies
Aug 4, 2008
Can anyone tell me what the "-a" option is for in mysqldump? I've seen it in use but can't seem to find it in the documentation.
View 4 Replies
View Related
Apr 24, 2007
setting up a new cron job.
I would like to have MySQLDUMP dump my specified database(s) into a specified folder using date and time stamps in the filename.
I've done some searching on this but haven't really came up with a way to do all of this at once, or if I may need to setup a cron job to rename the file after the dump has completed. I may be going about this all wrong to begin with, I'm just looking for a very simple and reliable way to backup my databases.
I'm testing this on a Shared Web Host account at this time which does have SSH shell access, but I wasn't sure if this makes a difference.
View 3 Replies
View Related
Apr 14, 2008
From Linux Shell, I need to back up a mysql database, JUST the data, NO Table information. Which options in mysqldump do I use?
View 14 Replies
View Related
Mar 26, 2008
This week I reached the pinnacle of all time greatest screw ups I've ever done with a web server in five years. During a routine upgrade, my server crashed and basically burned to the point that the technicians at Burst/Nocster felt it would be in my best interest to clear the server out and do a fresh restore.
Fortunately, I had the majorty of files and designs I've done on a safe backup. Unfortunately, the mysql database I had was not so fresh and recent. In there lies my big problem on an issue I really have not seen much information about.
We all know of the mysqldump command that can be used to backup databases and save a .sql file on the server. Its quick, easy, and relatively painless. The problem I have run into is
mysqldump --opt -u nqforum_braduser -p nqforum_nodqdb > /home/nqcom/backup.sql
This would be the command I'd use on my normal mysql dump. However, all of my files and past server information has been installed as a slave hard drive temporarily until I can gather everything I need. Therefore, the command above won't work because it is looking for this mysql database & user that does not exist on the new server. I currently have the slave hard drive path stored at
/mnt/olddrive/
So for example, to get to the website that would have that particular database
/mnt/olddrive/home/nqforum/
So my question for those who know anything about slave hard drives and mysql, how can I get a simple current backup of this database saved to a location, then of course once it is saved as a .sql file somewhere, I can simply run a mysql restore command in SSH to bring it back.
View 1 Replies
View Related
Apr 17, 2008
how do I make mysqldump command to run and make sql dump directly without prompting me for password
on cpanel server i can do this directly
# mysqldump database_database > /backup/backup.sql
on direct admin server i only can do this
# mysqldump -u root -p database_database > /backup/backup.sql
Enter password:
I don't want this because I'm going to run this command on cronjob!
View 14 Replies
View Related
Aug 3, 2009
I have a chrooted ftp user that I use on my server. I would like to run a cron job using this user that backs up my mySQL databases. When I execute the job, it complains about date and mysqldump not existing. I was able to fix the date problem simply by copying it from the actual /bin to the chrooted /bin. However, I can't simply copy mysqldump because it depends on several libraries. Anybody know how I can give this chrooted user access to commands that aren't in his chroot?
View 6 Replies
View Related
Jun 3, 2015
I am having trouble with backing up a wordpress multisite.. When backup is on i am getting this error:
Not all the data was backed up into /var/lib/psa/dumps/domains/<domain>/databases/<db_name> successfully. mysqldump: Got error: 1016: Can't open file: './<db_name>/<some_table>.frm' (errno: 24) when using LOCK TABLES
View 3 Replies
View Related