Where does the mysqldump command store the backed up databases?
I am trying to backup my databases through the terminal in Ubuntu using the mysqldump
command and it's successful. Where does it place the backed up databases?
I run the command like this:
$ mysqldump -h localhost -u username - p database_name > back_up_db.sql
but have no idea where back_up_db.sql
is stored.
mysqldump ubuntu
migrated from stackoverflow.com Mar 1 '11 at 13:47
This question came from our site for professional and enthusiast programmers.
add a comment |
I am trying to backup my databases through the terminal in Ubuntu using the mysqldump
command and it's successful. Where does it place the backed up databases?
I run the command like this:
$ mysqldump -h localhost -u username - p database_name > back_up_db.sql
but have no idea where back_up_db.sql
is stored.
mysqldump ubuntu
migrated from stackoverflow.com Mar 1 '11 at 13:47
This question came from our site for professional and enthusiast programmers.
add a comment |
I am trying to backup my databases through the terminal in Ubuntu using the mysqldump
command and it's successful. Where does it place the backed up databases?
I run the command like this:
$ mysqldump -h localhost -u username - p database_name > back_up_db.sql
but have no idea where back_up_db.sql
is stored.
mysqldump ubuntu
I am trying to backup my databases through the terminal in Ubuntu using the mysqldump
command and it's successful. Where does it place the backed up databases?
I run the command like this:
$ mysqldump -h localhost -u username - p database_name > back_up_db.sql
but have no idea where back_up_db.sql
is stored.
mysqldump ubuntu
mysqldump ubuntu
edited 8 mins ago
Paul White♦
51k14278450
51k14278450
asked Mar 1 '11 at 10:43
Opolot Jerry Collins
migrated from stackoverflow.com Mar 1 '11 at 13:47
This question came from our site for professional and enthusiast programmers.
migrated from stackoverflow.com Mar 1 '11 at 13:47
This question came from our site for professional and enthusiast programmers.
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
By default it does it to the console. You need to redirect the output to a file if you need to save it.
The place you put the backup is up to you. Ideally, it should be on a different machine in a different physical location. This is why you usually do a remote MySQL dump over SSH and get the data on a different machine. You just pipe the console output over ssh into a file on a different machine.
add a comment |
It should also be noted that the mysqldump command also has a switch for a destination file.
--result-file=file_name, -r file_name
add a comment |
Usually you use mysql dump like this
mysqldump -h host -u user -ppassword dbname > dumpfile
So the output is whatever file you redirect output to. The output file will contain instructions that will rebuild the database from scratch, including the schema, if your run it on a new install like so.
mysql -h host -u user -ppassword dbname < dumpfile
Here's wiki on IO redirection
add a comment |
It will be stored in the path or folder from where you run the mysql command
suppose you run the command from root then it will be stored in the root directory
you can see my backup file skillmappingcleardata.sql in the root directory because I run the mysql command from there
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "182"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f1511%2fwhere-does-the-mysqldump-command-store-the-backed-up-databases%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
By default it does it to the console. You need to redirect the output to a file if you need to save it.
The place you put the backup is up to you. Ideally, it should be on a different machine in a different physical location. This is why you usually do a remote MySQL dump over SSH and get the data on a different machine. You just pipe the console output over ssh into a file on a different machine.
add a comment |
By default it does it to the console. You need to redirect the output to a file if you need to save it.
The place you put the backup is up to you. Ideally, it should be on a different machine in a different physical location. This is why you usually do a remote MySQL dump over SSH and get the data on a different machine. You just pipe the console output over ssh into a file on a different machine.
add a comment |
By default it does it to the console. You need to redirect the output to a file if you need to save it.
The place you put the backup is up to you. Ideally, it should be on a different machine in a different physical location. This is why you usually do a remote MySQL dump over SSH and get the data on a different machine. You just pipe the console output over ssh into a file on a different machine.
By default it does it to the console. You need to redirect the output to a file if you need to save it.
The place you put the backup is up to you. Ideally, it should be on a different machine in a different physical location. This is why you usually do a remote MySQL dump over SSH and get the data on a different machine. You just pipe the console output over ssh into a file on a different machine.
edited 8 mins ago
Paul White♦
51k14278450
51k14278450
answered Mar 1 '11 at 10:47
RasikaRasika
22114
22114
add a comment |
add a comment |
It should also be noted that the mysqldump command also has a switch for a destination file.
--result-file=file_name, -r file_name
add a comment |
It should also be noted that the mysqldump command also has a switch for a destination file.
--result-file=file_name, -r file_name
add a comment |
It should also be noted that the mysqldump command also has a switch for a destination file.
--result-file=file_name, -r file_name
It should also be noted that the mysqldump command also has a switch for a destination file.
--result-file=file_name, -r file_name
answered Aug 12 '11 at 21:35
randomxrandomx
2,97422240
2,97422240
add a comment |
add a comment |
Usually you use mysql dump like this
mysqldump -h host -u user -ppassword dbname > dumpfile
So the output is whatever file you redirect output to. The output file will contain instructions that will rebuild the database from scratch, including the schema, if your run it on a new install like so.
mysql -h host -u user -ppassword dbname < dumpfile
Here's wiki on IO redirection
add a comment |
Usually you use mysql dump like this
mysqldump -h host -u user -ppassword dbname > dumpfile
So the output is whatever file you redirect output to. The output file will contain instructions that will rebuild the database from scratch, including the schema, if your run it on a new install like so.
mysql -h host -u user -ppassword dbname < dumpfile
Here's wiki on IO redirection
add a comment |
Usually you use mysql dump like this
mysqldump -h host -u user -ppassword dbname > dumpfile
So the output is whatever file you redirect output to. The output file will contain instructions that will rebuild the database from scratch, including the schema, if your run it on a new install like so.
mysql -h host -u user -ppassword dbname < dumpfile
Here's wiki on IO redirection
Usually you use mysql dump like this
mysqldump -h host -u user -ppassword dbname > dumpfile
So the output is whatever file you redirect output to. The output file will contain instructions that will rebuild the database from scratch, including the schema, if your run it on a new install like so.
mysql -h host -u user -ppassword dbname < dumpfile
Here's wiki on IO redirection
answered Mar 1 '11 at 10:47
Novikov
add a comment |
add a comment |
It will be stored in the path or folder from where you run the mysql command
suppose you run the command from root then it will be stored in the root directory
you can see my backup file skillmappingcleardata.sql in the root directory because I run the mysql command from there
add a comment |
It will be stored in the path or folder from where you run the mysql command
suppose you run the command from root then it will be stored in the root directory
you can see my backup file skillmappingcleardata.sql in the root directory because I run the mysql command from there
add a comment |
It will be stored in the path or folder from where you run the mysql command
suppose you run the command from root then it will be stored in the root directory
you can see my backup file skillmappingcleardata.sql in the root directory because I run the mysql command from there
It will be stored in the path or folder from where you run the mysql command
suppose you run the command from root then it will be stored in the root directory
you can see my backup file skillmappingcleardata.sql in the root directory because I run the mysql command from there
answered Jun 22 '15 at 12:21
selftaught91selftaught91
1112
1112
add a comment |
add a comment |
Thanks for contributing an answer to Database Administrators Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f1511%2fwhere-does-the-mysqldump-command-store-the-backed-up-databases%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown