Author

Topic: backup of the index (Read 668 times)

newbie
Activity: 10
Merit: 0
April 01, 2016, 07:41:58 PM
#7
thanks!
staff
Activity: 3458
Merit: 6793
Just writing some code
April 01, 2016, 02:51:07 PM
#6
do you know if Core keeps files open that it works with or only opens them if needed?
Depending on that I would have to close down Core before I make a backup - thinking about every week or few days to minimize the reindexing time.
And, yes, I just upgraded to 0.12 so hopefully that will not be a big issue any more. I actually do backup the whole database daily already (robocopy so I don't have to copy the whole thing - only changes), unfortunately I did not think of that yesterday, so that backup was overwritten with the 2 years out of sync  :-(
I think the files are constantly open. It is probably a good idea to have Core shut down when you do the backups and when you restore.
newbie
Activity: 10
Merit: 0
April 01, 2016, 02:35:37 PM
#5
do you know if Core keeps files open that it works with or only opens them if needed?
Depending on that I would have to close down Core before I make a backup - thinking about every week or few days to minimize the reindexing time.
And, yes, I just upgraded to 0.12 so hopefully that will not be a big issue any more. I actually do backup the whole database daily already (robocopy so I don't have to copy the whole thing - only changes), unfortunately I did not think of that yesterday, so that backup was overwritten with the 2 years out of sync  :-(
legendary
Activity: 4228
Merit: 1313
April 01, 2016, 02:29:48 PM
#4
I had another crash of my windows 8.1 machine which I run uᴉoɔʇᴉq core on - and that took down my index - - again.
Now after a night of the fan going full speed I am still 37 weeks out of date.
There must be a way to back up that work!
Would it be possible to have a back-up of the index and restore it after a crash that corrupts the index? A copy of a few GB should be faster than hours and hours of reindexing.
Or is there a reason why that should/would not work?
If it is possible would I have to shut down core before backing up the index to make sure no files are open that might not be backed up or could I use shadow copy to do that (or would I end up with a corrupted index after restoring a snapshot that core does not know what to do with)?
Thanks - Merlin
Of course. You need to go to the data directory and and find the blocks, chainstate, and database folders. These you need to backup. Copy them somewhere safe. However, these folders are not just "a couple of Gb" but rather 60+ Gb. You will need a hard drive that can store this full backup (because you will need all of it) and the original. Whenever you need to reindex, you can just copy those three folders back to the data directory. Keep in mind that this will set your sync state to the same as when you made that backup so you will need to wait a little bit for uᴉoɔʇᴉq Core to catch up. If you want to keep the catch up fast, then you should make those backups routinely.

Also, I advise that you upgrade to uᴉoɔʇᴉq Core 0.12.0 if you have not already. This version has fixes which makes it not necessary to reindex on a crash. You shouldn't need to reindex every time it crashes with this latest version.

It is also probably advisable to shutdown Core prior to backing it up.

staff
Activity: 3458
Merit: 6793
Just writing some code
April 01, 2016, 02:11:46 PM
#3
I had another crash of my windows 8.1 machine which I run uᴉoɔʇᴉq core on - and that took down my index - - again.
Now after a night of the fan going full speed I am still 37 weeks out of date.
There must be a way to back up that work!
Would it be possible to have a back-up of the index and restore it after a crash that corrupts the index? A copy of a few GB should be faster than hours and hours of reindexing.
Or is there a reason why that should/would not work?
If it is possible would I have to shut down core before backing up the index to make sure no files are open that might not be backed up or could I use shadow copy to do that (or would I end up with a corrupted index after restoring a snapshot that core does not know what to do with)?
Thanks - Merlin
Of course. You need to go to the data directory and and find the blocks, chainstate, and database folders. These you need to backup. Copy them somewhere safe. However, these folders are not just "a couple of Gb" but rather 60+ Gb. You will need a hard drive that can store this full backup (because you will need all of it) and the original. Whenever you need to reindex, you can just copy those three folders back to the data directory. Keep in mind that this will set your sync state to the same as when you made that backup so you will need to wait a little bit for Bitcoin Core to catch up. If you want to keep the catch up fast, then you should make those backups routinely.

Also, I advise that you upgrade to Bitcoin Core 0.12.0 if you have not already. This version has fixes which makes it not necessary to reindex on a crash. You shouldn't need to reindex every time it crashes with this latest version.
copper member
Activity: 924
Merit: 1007
hee-ho.
April 01, 2016, 01:03:54 PM
#2
you can back up anything in the blocks folder including the index folder and load it later if your files get corrupted.
newbie
Activity: 10
Merit: 0
April 01, 2016, 12:25:39 PM
#1
I had another crash of my windows 8.1 machine which I run bitcoin core on - and that took down my index - - again.
Now after a night of the fan going full speed I am still 37 weeks out of date.
There must be a way to back up that work!
Would it be possible to have a back-up of the index and restore it after a crash that corrupts the index? A copy of a few GB should be faster than hours and hours of reindexing.
Or is there a reason why that should/would not work?
If it is possible would I have to shut down core before backing up the index to make sure no files are open that might not be backed up or could I use shadow copy to do that (or would I end up with a corrupted index after restoring a snapshot that core does not know what to do with)?
Thanks - Merlin
Jump to: