RavenDB Database.Document file meaning - ravendb

I want to restore my database on RavenDB from a backup. But take an error - Database.Document file is missing.
Can anyone explain me, what is this a file? Where can I get it?

This file is used to store the db settings for the database. For example, whatever incremental backup it on, what buffer size to use, etc.

Related

Cpanel restore file code

I am using CPANEL and there I edited and created my website directly.
I had php file with about 300 lines and somehow I changed encoding to something other than utf-8. When I changed it and saved it saved only first 10-20 lines of my file. I cannot redo (ctrl+z) to bring my code back.
So my question is how to get lost file back? I haven't closed it yet so session is still valid. Please fast help. I know I will get downvote but I am in despair....
You may be lucky depending on backups...
If you go into the Files section and click Backups, then select the most recent backup where you know your file still existed in the correct state (before you made the encoding change).
If you then save the file and unzip it, hopefully your file will be there and you will be able to re-upload it. Good luck!
In future, definitely develop offline and use source control then upload copies of your file to avoid this.

Can openrdf-sesame recover the unseen data in openrdf-workbench?

Somehow I found some of the repositories(physics_base for example) in workbench are missing, but when I searched into the data path /.aduna/openrdf-sesame/repositories/physics_base, I found the data still exist.
So does this mean that there is a way to recover my data in workbench?
Thank you for any suggestion.
Yes that's possible. Just create a new repository of the same type in the workbench, open it once, shut down sesame, then copy over the contents of the directory to the data directory of your new repository.
It might even be possible to just create a repository of the same name and have it automatically pick up the existing data, but I can't test that right now (in a pub), so if you want to try that, make a backup first.

SQL Server BLOBs vs file links

Im planning to organise picture's storage in SQL Server from public folder. I want to do it as BLOBs.
I read in the internet that if any file from source folder is accidentally removed, it can lead to database failure. Is it correct? Did someone face this problem? Should a source folder be kept with no changes at all?
Thanks very much.
If you are going to store the images as BLOBs, than there is no need for a source file. If you are going to store the actual images in your file system, then yes, you will want some folder to store the actual images and then link to them in your db.
EDIT:
Whether it's images or files. Usually BLOBs are used for images.

Linking Redis database with a dump.rdb or dump.json file

Given a snapshot of an existing redis database in a dump.rdb (or in .json format) file, I want to restore this data in my own machine to run some tests on it.
Any pointers on how to do this would be greatly appreciated.
I have resorted to trying to parse the data in the dump.rdb and then save it in a redis DB manually. I feel like there is/should be a cleaner way.
If you want to restore the entire file, simply copy it to the right directory specified in redis.conf and restart redis server. But if you want to load a subset of keys/databases, you'd have to parse the dump file.
SO:
I continued doing it the "hacky" way and found that using the parser code found here:
https://github.com/sripathikrishnan/redis-rdb-tools was a great help.
using the parser sample code i could:
1) set up a redis client
2) use the parser to parse the data
3) use the client to "set" parsed data into a new redis database.
the rdd tools can also do that,
it work independantly of .rdb files and dump/restore working redis instances
it can apply merge, split, rename, search, filter, insert, delete on dumps and/or redis

How do I attach an .mdf to sql2005?

Running sp_attach_single_file_db gives this error:
The log scan number (10913:125:2) passed to log scan in database 'myDB' is not valid
Isn't it supposed to re-create the log file?
How else would I be able to attach/repair that .mdf file?
It depends what mode your database was in when it was detached, it's possible there are uncommitted/unwritten transactions in that log file that are needed to attach the database, otherwise there would be data loss. Do you know what recovery mode you were in when it was detached?
It worked, when I installed another one (with .ldf log file) then the one in question, then detached the first one again. Don't ask me why.