femindharamshi10
Posts: 102
Joined: Thu Jan 07, 2016 1:28 pm

Backup And Restore

Sat Apr 09, 2016 9:02 am

Imagine i created a apache2 server and a mysql server on a 8gb memory card put in to raspberry pi containing Raspbian.
I made a website to store important notes (into mysql)
now one fine day, my rpi burns and imagine its memory card it intact(unharmed) if i put it into another raspi, it would be same as the first one, but i dont have a second rpi, so how do i run this memory card on my pc, backup the mysql database and recover all the IMPORTANT notes ?

User avatar
bodge99
Posts: 20
Joined: Tue Mar 08, 2016 7:09 pm

Re: Backup And Restore

Sat Apr 09, 2016 9:15 am

Just boot your PC from a Linux live distro and backup everything from the SD card using this..

You do backup your data anyway... don't you??

Heater
Posts: 15838
Joined: Tue Jul 17, 2012 3:02 pm

Re: Backup And Restore

Sat Apr 09, 2016 9:42 am

femindharamshi10,

As you said yourself, the important thing here is your notes. In general your data. In this case held in the files maintained by mysql.

Everything else is disposable. As long as you have your data you can always rebuild a new system and put your data on it.

So the way is clear, ensure your database is backed up regularly. Preferably to different machines in different locations. If you house burns down you want to be able to find your data somewhere else.

So, use whatever means you like to copy those database files off of your Pi on a regular basis.

As for actually reading data directly off of a Pi SD card I would suggest getting Linux running on your PC and just drag-n-drop the files from SD card to it's hard drive. Working with these things gets a lot easier once you have a Linux machine to do it with.

Mostly I would not do that. I would just copy the files over the network using scp or ftp or SAMBA or NFS or Unison or whatever.
Memory in C++ is a leaky abstraction .

femindharamshi10
Posts: 102
Joined: Thu Jan 07, 2016 1:28 pm

Re: Backup And Restore

Sat Apr 09, 2016 3:36 pm

Heater wrote:femindharamshi10,

As you said yourself, the important thing here is your notes. In general your data. In this case held in the files maintained by mysql.

Everything else is disposable. As long as you have your data you can always rebuild a new system and put your data on it.

So the way is clear, ensure your database is backed up regularly. Preferably to different machines in different locations. If you house burns down you want to be able to find your data somewhere else.

So, use whatever means you like to copy those database files off of your Pi on a regular basis.

As for actually reading data directly off of a Pi SD card I would suggest getting Linux running on your PC and just drag-n-drop the files from SD card to it's hard drive. Working with these things gets a lot easier once you have a Linux machine to do it with.

Mostly I would not do that. I would just copy the files over the network using scp or ftp or SAMBA or NFS or Unison or whatever.

thanx alot. but if i cannot rebuild it and the only option i have is to get the mysql database somehow from the memory card so how do i do it ?

when i put the memory card in windows it shows its 67 mb only !
so when i put it in a linux machine will it show all its content ? like if i want /var/www/html from the memory card, will i able to get it ?

femindharamshi10
Posts: 102
Joined: Thu Jan 07, 2016 1:28 pm

Re: Backup And Restore

Sat Apr 09, 2016 3:37 pm

Heater wrote:femindharamshi10,

As you said yourself, the important thing here is your notes. In general your data. In this case held in the files maintained by mysql.

Everything else is disposable. As long as you have your data you can always rebuild a new system and put your data on it.

So the way is clear, ensure your database is backed up regularly. Preferably to different machines in different locations. If you house burns down you want to be able to find your data somewhere else.

So, use whatever means you like to copy those database files off of your Pi on a regular basis.

As for actually reading data directly off of a Pi SD card I would suggest getting Linux running on your PC and just drag-n-drop the files from SD card to it's hard drive. Working with these things gets a lot easier once you have a Linux machine to do it with.

Mostly I would not do that. I would just copy the files over the network using scp or ftp or SAMBA or NFS or Unison or whatever.

thanx alot. but if i cannot rebuild it and the only option i have is to get the mysql database somehow from the memory card so how do i do it ?

when i put the memory card in windows it shows its 67 mb only !
so when i put it in a linux machine will it show all its content ? like if i want /var/www/html from the memory card, will i able to get it ?

Return to “General discussion”