This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Reloading a database
#1
I'm trying to unload, modify, and reload the database. These are the step I'm taking, and it's not working:

Setup 

1. Download and install DB Browser for SQLite
2. Download and install PeaZip

Steps

1. Unload the database on the Logic Machine by going to "Utilities" and click "Backup". This will download a tar.gz file with all the required files.
2. Right-click on the downloaded file and choose `PeaZip -> Extract here`, this will create a tar file with the same name
3. Right-click on the tar file and choose `PeaZip -> Extract here`, that will extract all the files to the directory, such as `current.db` and the `icons` directory
4. Open DB Browser for SQLite
5. Click `Open Database` and choose the extracted `current.db` file
6. Change the data you want to change
7. Click `Write Changes` to persist the changes in the database
8. Go to `http://onlinemd5.com/`
9. Click `Choose File` and select `current.db`
10. Copy the file checksum
11. Open `current.md5` with Notepad or any other text editor
12. Change the existing checksum to the new checksum
13. Save and close `current.md5`
14. Select all the files that were extracted in step three, right-click, and choose `PeaZip -> Convert`
15. Select `GZip` as the output format and click `OK`
16. Go to the `Utilities` tab of the Logic Machine
17. Click `Restore` and select the tar.gz file created in step 15
18. See the message "Backup file is invalid"

Is there a step that's incorrect? What format should the file that you reload be in?
Reply
#2
Hi,

Why do you want to change the DB offline when you can run a script to modify the DB online..

BR,

Erwin
Reply
#3
Try using 7-Zip instead, you can also upload .tar instead of .tar.gz
Reply
#4
Quote:Why do you want to change the DB offline when you can run a script to modify the DB online..

A couple of reasons:

1. The application takes a bunch of input to determine how to alter the data, the input is easier to enter with a GUI

2. I can have tests and more controlled deployment

3. C# is more comfortable to code with

On the other hand, there are some drawbacks too: 

1. I have to deploy the application that alters the data separately, by running it is a script there's none of that since you can just copy paste the code

2. No need to unload etc. which makes it easier for the user

3. Easier to change since it doesn't require a separate environment

I'm not completely convinced that it's easier to do offline. How hard is it to alter the data with Lua? Is there a neat API? 

Quote:Try using 7-Zip instead, you can also upload .tar instead of .tar.gz
Thanks, I'll try that
Reply
#5
I've now also tried with 7Zip to compress to a tar file - same result.
Reply
#6
Are you also able to reproduce this behavior?
Reply
#7
Can you provide the archive that you have created?
Reply
#8
You can download it here: https://drive.google.com/file/d/1rysaMMG...HZL44/view
Reply
#9
The archive is fine it's just that the validation procedure is quite strict. For now, if you have access to Linux you can run busybox gzip on your tar archive. We'll make the required changes in the upcoming firmware.
Reply
#10
Quote:We'll make the required changes in the upcoming firmware

Do you have an approximation of when the upcoming firmware is released?
Reply
#11
This month.
Reply


Forum Jump: