This object is in archive! 

Help restore db tracks and points

Konstantin shared this problem 8 years ago
Not a Problem

Recover deleted from sd-card files of points and tracks are copied to the locus / database.

The data do not show up, probably damaged db-file.

Tell me what to do. Is it possible to send the recovered files for review.

Replies (11)

photo
1

And make automatic backups of tracks and points.

about the fact that only the saved settings I found out when exiting point.

restore settings easily restore tracks and points is much more complex

photo
1

Hello Konstantin,

honestly I'm not sure if I can understand your last post.

However Locus creates automatic backups into folder Locus/backup/auto . Would you please check if there are the any *.zip files, please?

Thank you

Petr

photo
1

thanks for the answer. automatically saved configuration only. I have 5 files with the settings. a manual backup saves and points and tracks and settings.

photo
1

Left manual backup


Right - auto

photo
1

Now I can not restore the tracks and points,

I tried to copy the db-file in daradase,

I tried to back up in the backup, but they are not displayed

photo
1

1. I formatted SD card (locus / date / datedase /*.* deleted), the card can not be read.

2. I recover deleted files (tracks.db 31,2m - 02.01.2016, etc.)

3. How do I get them back in the locus / date / database. When you copy are deleted or overwritten empty.

photo
1

Hello Konstantin,

well I'm not sure if I can help if you've formated the SDcard. Do you have please some backup of mentioned *.zip files from Locus/backup dir?

Regards

Petr

photo
1

Petr, I have a 5 * .zip with automatic backup. They contain only settings. Tracks and points I lost.

photo
1

is it possible to return to the / data / databse recovered from formatted files? Making automatic backup tracks and points, ideally copy them to Google Cloud

photo
1

recovered files are read, as they open a locus?

photo
2

Hello,

empty automatic backup - it seems that the database files were broken during backup. This is the reason of empty packages.

The default location for database files is in data/database. So if you were able to recover deleted files then you can put them into this folder and try to start Locus. However I guess that you've already tried it. For this reason try to "recover" the database file using sqlite3 utils - please see article how to http://docs.locusmap.eu/doku.php?id=manual:advanced:map_tools:corrupted_sqlite

Thank you

Petr

photo
1

tracks.db - 31Mb tracks2.db - 12Kb

waypoints.DB - 1700Kb waypoints2.DB - 10Kb

D:\111>sqlite3 tracks.db ".dump" | sqlite3 tracks2.db

Error: near line 3: table android_metadata already exists

Error: near line 5: table categories already exists

Error: near line 6: UNIQUE constraint failed: categories._id

Error: near line 7: UNIQUE constraint failed: categories._id

Error: near line 8: UNIQUE constraint failed: categories._id

Error: near line 9: UNIQUE constraint failed: categories._id

Error: near line 10: UNIQUE constraint failed: categories._id

Error: near line 11: UNIQUE constraint failed: categories._id

Error: near line 12: UNIQUE constraint failed: categories._id

Error: near line 13: UNIQUE constraint failed: categories._id

Error: near line 14: UNIQUE constraint failed: categories._id

Error: near line 15: table tracks already exists

Error: near line 18: table locations already exists

Error: near line 21: table folder_group already exists

Error: near line 28: index locations_parent_id already exists

D:\111>sqlite3 waypoints.DB ".dump" | sqlite3 waypoints2.DB

Error: near line 3: table android_metadata already exists

Error: near line 5: table categories already exists

Error: near line 6: UNIQUE constraint failed: categories._id

Error: near line 7: UNIQUE constraint failed: categories._id

Error: near line 8: UNIQUE constraint failed: categories._id

Error: near line 9: UNIQUE constraint failed: categories._id

Error: near line 10: UNIQUE constraint failed: categories._id

Error: near line 11: UNIQUE constraint failed: categories._id

Error: near line 12: UNIQUE constraint failed: categories._id

Error: near line 13: UNIQUE constraint failed: categories._id

Error: near line 14: UNIQUE constraint failed: categories._id

Error: near line 15: UNIQUE constraint failed: categories._id

Error: near line 16: UNIQUE constraint failed: categories._id

Error: near line 17: UNIQUE constraint failed: categories._id

Error: near line 18: UNIQUE constraint failed: categories._id

Error: near line 19: UNIQUE constraint failed: categories._id

Error: near line 20: UNIQUE constraint failed: categories._id

Error: near line 21: UNIQUE constraint failed: categories._id

Error: near line 22: UNIQUE constraint failed: categories._id

Error: near line 23: UNIQUE constraint failed: categories._id

Error: near line 24: UNIQUE constraint failed: categories._id

Error: near

line 25: UNIQUE constraint failed: categories._id

Error: near line 26: UNIQUE constraint failed: categories._id

Error: near line 27: table waypoints already exists

Error: near line 30: table folder_group already exists

Error: near line 37: index waypoints_id already exists

Error: near line 38: index waypoints_query_exists already exists

photo
1

sqlite> .fullschema

CREATE TABLE android_metadata (locale TEXT);

CREATE TABLE categories (_id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT,icon TEXT,extra_style BYTE, group_id INTEGER, labels_mode INTEGER);

CREATE TABLE tracks (_id INTEGER PRIMARY KEY AUTOINCREMENT, parent_id INTEGER, name STRING, breaks BYTE, extra_data BYTE, extra_style BYTE, use_category_style INTEGER,num_points INTEGER, start_time INTEGER, stop_time INTEGER, total_length FLOAT, total_length_move FLOAT, total_time INTEGER, total_time_move INTEGER, speed_max FLOAT, altitude_min FLOAT, altitude_max FLOAT, ele_neutral_distance FLOAT, ele_neutral_height FLOAT, ele_positive_distance FLOAT, ele_positive_height FLOAT, ele_negative_distance FLOAT, ele_negative_height FLOAT, ele_total_abs_distance FLOAT, ele_total_abs_height FLOAT, overview_image BYTE);

CREATE TABLE locations (_id INTEGER PRIMARY KEY AUTOINCREMENT, provider TEXT, longitude FLOAT, latitude FLOAT, time INTEGER, elevation FLOAT, speed FLOAT, bearing FLOAT, accuracy FLOAT, parent_id INTEGER, previous_id INTEGER, sensor_heart_rate INTEGER, sensor_cadence INTEGER, sensor_speed FLOAT, sensor_power FLOAT, sensor_strides INTEGER, sensor_battery INTEGER, sensor_temperature FLOAT); CREATE INDEX locations_parent_id ON locations (parent_id);

CREATE TABLE folder_group (_id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT);

/* No STAT tables available */

sqlite>

photo
1

sqlite> .dbinfo

database page

size: 4096

write format: 1

read format: 1

reserved bytes: 0

file change counter:

1702

database page count:

7995

freelist page count: 0

schema cookie: 10

schema format: 4

default cache

size: 0

autovacuum top root: 9

incremental

vacuum: 0

text encoding: 1 (utf8)

user version: 9

application id: 0

software version: 3007011

number of tables: 6

number of

indexes: 1

number of

triggers: 0

number of views: 0


schema size: 1361

photo
1

sqlite> .header on

sqlite> .mode csv

sqlite> .once d:\111\out_tracks.csv

sqlite> select * from tracks;

Error: database disk image is malformed

sqlite>

photo
1

Hi,

honestly I don't understand your steps. It seems that the files waypoints2.db and tracks2.db existed before you submit the dump. This the reason of errosr. Would you please try dump and create new DB files. I mean for example:

sqlite3 tracks.db ".dump" | sqlite3 tracks_new_database.db

Or would you please share with me the recovered waypoints.db and tracks.db files?

Thank you

Petr

photo
1

Thank you for helping,

I am not strong in databases

photo
1

Hello Konstantin,

well I've tried to fix the database but file is really corrupted and I'm not able to fix it. Honestly I don't know what happen with your files. The SD card could be wrong, also recovery after format can cause some complication. Maybe somebody from community is more familiar with sqlitedb.

I'm sorry for this

Regards

Petr

photo
1

Peter, thank you very much.

I am trying to rebuild different programs with sd-card files.

As long as the same result

photo
1

OK... and sorry for that.

photo
1

if it can be done in the locus pro automatic backup points and tracks with loading on google cloud.

photo
2

Unfortunately Locus doesn't offer such feature. But there are some synchronization apps that can automatically backup custom folder into cloud. Please check for example the app https://play.google.com/store/apps/details?id=dk.tacit.android.foldersync.lite

Replies have been locked on this page!