Page 1 of 1

Import should include recycle bin

Posted: Wed Mar 18, 2015 11:40 am
by Thomas Lohrum
Hi Alex,

today i had another crash causing the database file to go "malformed" (SQLite Error 11). There was no other exception. Again log1.txt was empty (0 bytes).

As usual i created a new db file and imported from the old database.

To fully regain all of my data i ask to include recycle bin also (at least as an option), when doing an import. There is no other easy way to recover that data otherwise, since xml-export/import doesn't support it either.

Thomas

Re: Import should include recycle bin

Posted: Wed Mar 18, 2015 12:58 pm
by usbpoweredfridge
Support+

Chris

Re: Import should include recycle bin

Posted: Thu Mar 19, 2015 6:46 am
by CintaNotes Developer
Hi guys,

Thanks for the suggestion. I added it to the roadmap:
http://roadmap.cintanotes.com/topic/646240-/

Also there's a workaround here, please see the attached .bat file.
(It requires for sqlite3.exe to be in PATH or in the current directory).

Use as follows:

Code: Select all

C:\Temp\>copytrash.bat old.db new.db


Also keep an eye on the "Delete permanently after N days" setting - it can empty the recycle bin before you open it!

Hope this helps!

Re: Import should include recycle bin

Posted: Thu Mar 19, 2015 9:20 am
by Thomas Lohrum
Thanks Alex. An easy to use workaround does the job to me. For less experienced users the feature on the roadmap is more important. Btw. there is no need to set the variables in the batch file. They are not used anyway.

The relevant statement to all interested is:

sqlite3.exe -echo -batch [db] "ATTACH DATABASE '[old-db]' AS Old; INSERT INTO NotesTrash SELECT * FROM Old.NotesTrash;"

Example:

sqlite3.exe -echo -batch cintanotes.db "ATTACH DATABASE 'old-cintanotes.db' AS Old; INSERT INTO NotesTrash SELECT * FROM Old.NotesTrash;"

sqlite3.exe is provided by the download of copytrash.zip in this thread.

Thomas

Re: Import should include recycle bin

Posted: Thu Mar 19, 2015 9:24 am
by CintaNotes Developer
Thomas, thanks for summing up.
Sorry for redundant vars - I intended to improve readability with them but never got to it;)

Re: Import should include recycle bin

Posted: Fri Mar 20, 2015 8:20 pm
by CintaNotes Developer
I think that generally export to XML and import from XML and DB should give the option to include the recycle bin (which would be off by default). What do you think?

Re: Import should include recycle bin

Posted: Mon Mar 23, 2015 9:33 am
by Thomas Lohrum
CintaNotes Developer wrote:I think that generally export to XML and import from XML and DB should give the option to include the recycle bin (which would be off by default). What do you think?

Reasons to do so:

  • We had people here in the forum telling us, they are actually using r-bin as part of their data management.
  • We had people complain about the loss of r-bin after importing their data to a new database, because the old one got corrupted.
  • We consider r-bin as part of the database.

So yes, your intention is correct. Let's add it as a general option.

Thomas

Re: Import should include recycle bin

Posted: Thu Mar 26, 2015 6:38 pm
by CintaNotes Developer
Agreed on all accounts. I'll add this task to our backlog, with medium priority. Thanks!