From: Josip <jo...@pi...> - 2014-04-24 18:39:54
|
Dana 24.4.2014. 9:04, TJMcK je napisao: > Josip-3 wrote >> Do hotbackup of your database and that will try simple recovery on that. >> Get db env directory with "gramps -l" and use result in "-h" switch, >> >> db_hotbackup -h FOO -b BAR -v >> >> BAR directory will be created if they not exist. >> If got complains about env don't exist use "-F" switch. >> >> If everything goes well start Gramps and set database path to BAR and >> try to load it, if not post result (always use "-v" for verbosity) > > This is all new to me so I need you to elaborate on a few things... > > 1) Do I run the db_hotbackup command in the folder with the corrupted > database? It is not necessary just use "-h" to tell where your database is (if data and log files is in different directories then use "-d" and "-i" switchs) > 2) Can you give an example of how I use the gramps -l result in the -h > switch? > 3) And if I need to run the -F switch, do you mean: db_hotbackup -F (by > itself?) > 4) Will BAR be the name of the folder? > 5) Are you saying I should use Gramps -v -- if I need to post errors? > ## For example this is done in Windows but commands is same as Linux one c:\>python2 gramps.py -l List of known Family Trees in your database path C:\GRAMPSTEST\gramps\grampsdb\534a411b with name "py27master" C:\GRAMPSTEST\gramps\grampsdb\534a419e with name "py3master" C:\GRAMPSTEST\gramps\grampsdb\53595365 with name "test1" ## Now lets say i want "test1" to backup c:\>mkdir C:\GRAMPSTEST\gramps\backups c:\>db_hotbackup -Fv -h C:\GRAMPSTEST\gramps\grampsdb\53595365 -b C:\GRAMPSTEST\gramps\backups\test1 db_hotbackup: BDB5032 hot backup started at Thu Apr 24 20:19:50 2014 db_hotbackup: BDB0724 copying database C:\GRAMPSTEST\gramps\grampsdb\53595365\tag_name.db to C:\GRAMPSTEST\gramps\backups\test1\tag_name.db db_hotbackup: BDB0724 copying database C:\GRAMPSTEST\gramps\grampsdb\53595365\tag.db to C:\GRAMPSTEST\gramps\backups\test1\tag.db db_hotbackup: BDB0724 copying database C:\GRAMPSTEST\gramps\grampsdb\53595365\surnames.db to C:\GRAMPSTEST\gramps\backups\test1\surnames.db db_hotbackup: BDB0724 copying database C:\GRAMPSTEST\gramps\grampsdb\53595365\source_id.db to C:\GRAMPSTEST\gramps\backups\test1\source_id.db ... ... ... db_hotbackup: BDB0742 lowest numbered log file copied: 4 db_hotbackup: BDB5040 C:\GRAMPSTEST\gramps\backups\test1: run catastrophic recovery db_hotbackup: BDB2526 Finding last valid log LSN: file: 4 offset 2744340 db_hotbackup: BDB1514 Recovery starting from [4][28] db_hotbackup: BDB1518 Recovery complete at Thu Apr 24 20:19:51 2014 db_hotbackup: BDB1519 Maximum transaction ID 80008f76 recovery checkpoint [4][2744340] db_hotbackup: BDB5041 C:\GRAMPSTEST\gramps\backups\test1: remove unnecessary log files db_hotbackup: BDB5042 hot backup completed at Thu Apr 24 20:19:51 2014 c:\>python2 Gramps.py -c behavior.database-path:C:\GRAMPSTEST\gramps\backups Current Gramps config setting: behavior.database-path:u'C:\\GRAMPSTEST\\gramps\\grampsdb' New Gramps config setting: behavior.database-path:'C:\\GRAMPSTEST\\gramps\\backups' -- Josip |