Restore SQL Database from full system backup
long story short I am restoring a failed server. I have a backup of most of the file system. I need to restore the SQL databases but I don't have a copy of the mysqldump. so I've restored the files to /var/lib/mysql. But when I try to view the tables the database is empty.
Can this be done? And what other steps do I need to take? at the very least can I mount this DB somewhere where I can read the data and recreate the pages and articles?
Ubuntu 18.04
linux ubuntu mysql mysqldump
add a comment |
long story short I am restoring a failed server. I have a backup of most of the file system. I need to restore the SQL databases but I don't have a copy of the mysqldump. so I've restored the files to /var/lib/mysql. But when I try to view the tables the database is empty.
Can this be done? And what other steps do I need to take? at the very least can I mount this DB somewhere where I can read the data and recreate the pages and articles?
Ubuntu 18.04
linux ubuntu mysql mysqldump
can this be done and how? ill put it in an edit.
– Derek Frelow
Jan 10 at 16:10
The transfered tables are an empty set. I only moved the folders with the names of the tables. should I move the whole mysql folder?
– Derek Frelow
Jan 10 at 17:34
The whole/var/lib/mysql
folder, yes. I thought you had done that since you've stated it in your question.
– slhck
Jan 10 at 19:16
so now im getting this error when starting mysql.mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2019-01-10 19:39:00 UTC; 15s ago Process: 3089 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE) Process: 3067 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
im sorry the formating looks horrible here.
– Derek Frelow
Jan 10 at 19:41
Please just edit the question to include any additional info.
– slhck
Jan 10 at 20:05
add a comment |
long story short I am restoring a failed server. I have a backup of most of the file system. I need to restore the SQL databases but I don't have a copy of the mysqldump. so I've restored the files to /var/lib/mysql. But when I try to view the tables the database is empty.
Can this be done? And what other steps do I need to take? at the very least can I mount this DB somewhere where I can read the data and recreate the pages and articles?
Ubuntu 18.04
linux ubuntu mysql mysqldump
long story short I am restoring a failed server. I have a backup of most of the file system. I need to restore the SQL databases but I don't have a copy of the mysqldump. so I've restored the files to /var/lib/mysql. But when I try to view the tables the database is empty.
Can this be done? And what other steps do I need to take? at the very least can I mount this DB somewhere where I can read the data and recreate the pages and articles?
Ubuntu 18.04
linux ubuntu mysql mysqldump
linux ubuntu mysql mysqldump
edited Jan 10 at 20:06
slhck
160k47445467
160k47445467
asked Jan 10 at 15:37
Derek FrelowDerek Frelow
62
62
can this be done and how? ill put it in an edit.
– Derek Frelow
Jan 10 at 16:10
The transfered tables are an empty set. I only moved the folders with the names of the tables. should I move the whole mysql folder?
– Derek Frelow
Jan 10 at 17:34
The whole/var/lib/mysql
folder, yes. I thought you had done that since you've stated it in your question.
– slhck
Jan 10 at 19:16
so now im getting this error when starting mysql.mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2019-01-10 19:39:00 UTC; 15s ago Process: 3089 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE) Process: 3067 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
im sorry the formating looks horrible here.
– Derek Frelow
Jan 10 at 19:41
Please just edit the question to include any additional info.
– slhck
Jan 10 at 20:05
add a comment |
can this be done and how? ill put it in an edit.
– Derek Frelow
Jan 10 at 16:10
The transfered tables are an empty set. I only moved the folders with the names of the tables. should I move the whole mysql folder?
– Derek Frelow
Jan 10 at 17:34
The whole/var/lib/mysql
folder, yes. I thought you had done that since you've stated it in your question.
– slhck
Jan 10 at 19:16
so now im getting this error when starting mysql.mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2019-01-10 19:39:00 UTC; 15s ago Process: 3089 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE) Process: 3067 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
im sorry the formating looks horrible here.
– Derek Frelow
Jan 10 at 19:41
Please just edit the question to include any additional info.
– slhck
Jan 10 at 20:05
can this be done and how? ill put it in an edit.
– Derek Frelow
Jan 10 at 16:10
can this be done and how? ill put it in an edit.
– Derek Frelow
Jan 10 at 16:10
The transfered tables are an empty set. I only moved the folders with the names of the tables. should I move the whole mysql folder?
– Derek Frelow
Jan 10 at 17:34
The transfered tables are an empty set. I only moved the folders with the names of the tables. should I move the whole mysql folder?
– Derek Frelow
Jan 10 at 17:34
The whole
/var/lib/mysql
folder, yes. I thought you had done that since you've stated it in your question.– slhck
Jan 10 at 19:16
The whole
/var/lib/mysql
folder, yes. I thought you had done that since you've stated it in your question.– slhck
Jan 10 at 19:16
so now im getting this error when starting mysql.
mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2019-01-10 19:39:00 UTC; 15s ago Process: 3089 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE) Process: 3067 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
im sorry the formating looks horrible here.– Derek Frelow
Jan 10 at 19:41
so now im getting this error when starting mysql.
mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2019-01-10 19:39:00 UTC; 15s ago Process: 3089 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE) Process: 3067 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
im sorry the formating looks horrible here.– Derek Frelow
Jan 10 at 19:41
Please just edit the question to include any additional info.
– slhck
Jan 10 at 20:05
Please just edit the question to include any additional info.
– slhck
Jan 10 at 20:05
add a comment |
1 Answer
1
active
oldest
votes
Thanks to @slhck!
The solution was not to copy the entire mysql folder but just the folder of the databases you need (in my case DerekFrelow_com
) the thing I forgot to do was change my permissions on the folder.
I noticed the more comments we had the more relevant the "related Links got" so here is the source that gave me the ah-ha moment.
Import or restore MySQL databases from var directory
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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%2fsuperuser.com%2fquestions%2f1392798%2frestore-sql-database-from-full-system-backup%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks to @slhck!
The solution was not to copy the entire mysql folder but just the folder of the databases you need (in my case DerekFrelow_com
) the thing I forgot to do was change my permissions on the folder.
I noticed the more comments we had the more relevant the "related Links got" so here is the source that gave me the ah-ha moment.
Import or restore MySQL databases from var directory
add a comment |
Thanks to @slhck!
The solution was not to copy the entire mysql folder but just the folder of the databases you need (in my case DerekFrelow_com
) the thing I forgot to do was change my permissions on the folder.
I noticed the more comments we had the more relevant the "related Links got" so here is the source that gave me the ah-ha moment.
Import or restore MySQL databases from var directory
add a comment |
Thanks to @slhck!
The solution was not to copy the entire mysql folder but just the folder of the databases you need (in my case DerekFrelow_com
) the thing I forgot to do was change my permissions on the folder.
I noticed the more comments we had the more relevant the "related Links got" so here is the source that gave me the ah-ha moment.
Import or restore MySQL databases from var directory
Thanks to @slhck!
The solution was not to copy the entire mysql folder but just the folder of the databases you need (in my case DerekFrelow_com
) the thing I forgot to do was change my permissions on the folder.
I noticed the more comments we had the more relevant the "related Links got" so here is the source that gave me the ah-ha moment.
Import or restore MySQL databases from var directory
answered Jan 10 at 20:21
Derek FrelowDerek Frelow
62
62
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- 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%2fsuperuser.com%2fquestions%2f1392798%2frestore-sql-database-from-full-system-backup%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
can this be done and how? ill put it in an edit.
– Derek Frelow
Jan 10 at 16:10
The transfered tables are an empty set. I only moved the folders with the names of the tables. should I move the whole mysql folder?
– Derek Frelow
Jan 10 at 17:34
The whole
/var/lib/mysql
folder, yes. I thought you had done that since you've stated it in your question.– slhck
Jan 10 at 19:16
so now im getting this error when starting mysql.
mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2019-01-10 19:39:00 UTC; 15s ago Process: 3089 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE) Process: 3067 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
im sorry the formating looks horrible here.– Derek Frelow
Jan 10 at 19:41
Please just edit the question to include any additional info.
– slhck
Jan 10 at 20:05