Hi, I have a Dgraph cluster running and I’m trying to manually backup files that are owned by an active Dgraph alpha node. In your documentation it says
Badger is also rsync-friendly because all files are immutable, barring the latest value log which is append-only. So, rsync can be used as rudimentary way to perform a backup
and provides an rsync script that can be run.However, when I try to do it locally on one node to test it I see that accessing those copied files raises errors:
[email protected]:/dgraph# cp -Rv p p2
'p' -> 'p2'
'p/LOCK' -> 'p2/LOCK'
'p/MANIFEST' -> 'p2/MANIFEST'
'p/KEYREGISTRY' -> 'p2/KEYREGISTRY'
'p/00001.mem' -> 'p2/00001.mem'
'p/DISCARD' -> 'p2/DISCARD'
'p/000001.vlog' -> 'p2/000001.vlog'
[email protected]:/dgraph# rm -f p2/LOCK
[email protected]:/dgraph# ls p2/
000001.vlog 00001.mem DISCARD KEYREGISTRY MANIFEST
But when I try to access the database in that folder badger crashes, see info-error.log (4.8 KB)
If I remove the .mem file, then it can open the database, but why ? I’m not sure I understand .mem files. I thought memtables were in memory only and .sst files were the flushed/compacted version of it. Is it the corresponding wal of the memtable in memory ? or what we call the commit log in other LSM storage versions.
Thanks