Recover Old Notes in a new setup

Backup, Restore, Netbak Replicator, Cloud Storage Services
Locked
QRocks
Starting out
Posts: 16
Joined: Thu Jun 17, 2021 12:39 am

Recover Old Notes in a new setup

Post by QRocks »

Hi,
I had to reset my small TS253 nas after a sw upgrade,
fortunately I have the original disk (1only was mounted as static) and from it I recover the
NotesStation3\storage\note\
(and all the sub folders) (I suppose json files are the most relevant ones)
Now the question:)
is there any way to put back it in the (same nas) that now has a fully new HDD ?


Thank you !
Mousetick
Experience counts
Posts: 1081
Joined: Thu Aug 24, 2017 10:28 pm

Re: Recover Old Notes in a new setup

Post by Mousetick »

Where are the note files you recovered from the old disk currently located?

If you have them on a computer, you can use a SCP or SFTP client to transfer them to the same location on the new disk, as they were on the old disk. You'll need to enable SSH access in QTS, and reinstall NoteStation on the NAS first.

If the computer is running Windows you can use WinSCP (https://winscp.net/) which provides an easy to use interface, for the transfer.
QRocks
Starting out
Posts: 16
Joined: Thu Jun 17, 2021 12:39 am

Re: Recover Old Notes in a new setup

Post by QRocks »

HI,
thank you for your reply,
I copied, with WinSCP, a folder named "storage" it contains users and other files BUT nothing, NONE old note is added .
(notestation last version is installed and so container station).
Logged out and nothing...
MAYBE I need to overwrite ALL folders?
or reboot the nas?
Mousetick
Experience counts
Posts: 1081
Joined: Thu Aug 24, 2017 10:28 pm

Re: Recover Old Notes in a new setup

Post by Mousetick »

First, try stopping and starting Container Station and Notes Station from the App Center (use the drop-down menu below the app icon) - no need to reboot the whole NAS.

It's possible the app uses some kind of database to keep track of notes. I don't use this app and have no idea how it works. If you overwrite all folders under NotesStation3 that may do the trick, or it could break it completely. Worth a try anyway. Make sure to stop the app(s) before overwriting, and restart them afterwards.
QRocks
Starting out
Posts: 16
Joined: Thu Jun 17, 2021 12:39 am

Re: Recover Old Notes in a new setup

Post by QRocks »

Yes, I tried to stop NS and the container (or the same in the inverse order)
but nothing, none of the old notes are back :' after restarting them.

Is it safe replace ALL files in the main folder of NS?**
(I attached a screenshot of the menu, how it is intended to work ? cuz it not work at all (just click and on it and nothing))

** my folder copy is of some month ago... so the version is not EXACTLY the last.

Thank you!
You do not have the required permissions to view the files attached to this post.
Mousetick
Experience counts
Posts: 1081
Joined: Thu Aug 24, 2017 10:28 pm

Re: Recover Old Notes in a new setup

Post by Mousetick »

Not really safe, no. Especially if you overwrite stuff from an older version. If you can overwrite only the data files and leave the program files alone, it might work.

Unless someone else who knows better chimes in to help you, your safest recourse at this point would be to contact QNAP technical support. If you're patient and lucky, they might actually give you a helpful answer.
QRocks
Starting out
Posts: 16
Joined: Thu Jun 17, 2021 12:39 am

Re: Recover Old Notes in a new setup

Post by QRocks »

Thank you again,

use the qnap assistance it's an idea: I already know : they will ask to use teamviewer, I will give them right permissions and they will work with your Nas,
imho the real issue it's here : it's difficult try to learn something,
it's too bit "closed" world specially for not linux people. :roll:
Mousetick
Experience counts
Posts: 1081
Joined: Thu Aug 24, 2017 10:28 pm

Re: Recover Old Notes in a new setup

Post by Mousetick »

IMHO the issue is relying on QNAP applications and using the NAS to run applications as a computer. QNAP is primarily a storage hardware manufacturer. They're pretty good at this job and providing basic file server features, but when it comes to their apps, they're quite bad. As you noted, they're "closed" and they lock you in. Suppose you wanted to switch to another brand of NAS for whatever reason. Well you couldn't without losing all your notes because you stored them in a proprietary (or open but unknown) format that only works on QNAP devices. You're stuck with the QNAP Note Station app and you depend on QNAP technical support for any help. This is bad.

My advice would be to use the NAS only as a storage platform. You can store your notes database(s) on the NAS but run the note-taking application(s) on the client computer.

If you must run server-side applications on the NAS, then you should use 3rd-party applications that either/or:
- provide cross-platform compatibility
- are open source or use standard open formats
- are very popular and in widespread use
so it's easy to move data from one storage to another, or to migrate from one app to another, or to find help when troubleshooting.

And last, the best format to store very important sensitive information is in loose plain text files so storing, reading, moving and recovering them is a no-brainer no matter what device you're using.
ivantalk
New here
Posts: 6
Joined: Thu Aug 19, 2021 7:51 pm

Re: Recover Old Notes in a new setup

Post by ivantalk »

Hi QRocks, may be it is late that I make reply to your post after you posted it on 2021. I have a similar situation as you had as my old disk was found with bad sectors on now, 2023.
I cannot restart the Notes Station 3 app (also container station) as my drive turned into a ready-only state. I copied all files in the Notes Station 3 folder, restored to the new installed Notes Station 3 folder (jsut as you did on 2021), and we got no luck on this.

Now I have a solution on this issue, as I have no way to contact you, I don't know your issues had solved on 2 years before, on you still keep the old data with you. I just wrote down the solution here, for you and other to solve this embarrasing issue as QNAP software provides no ability on data recovery for its application. and its is so rediculuos.

Steps to recover previous ibd datafile to Notes Station 3:
1. Sort modified date in backup NotesStation3\db\mysql\NotesStation3, marked the recent updated files with user data:
note.ibd
note_content.ibd
notebook.ibd
section.ibd
site_metadata.ibd
user.ibd
(I list files above for my case, you may have a different list of filenames)

2. Enter mysql in new installed Notes Station 3:
Confirm the which partition is your system partition, usually apps are installed to CACHEDEV1_DATA, mine is CACHEDEV7_DATA
/share/CACHEDEV7_DATA/.qpkg/container-station/bin/system-docker exec -it NotesStation3 /usr/bin/mysql

3. Mount backup file in above mysql command session, repeat the steps with all files in your list (https://dev.mysql.com/doc/refman/8.0/en ... ation.html)
use NotesStation3;
alter table note discard tablespace; /* to remove ibd file*/
WinSCP: upload your files one by one to the location, my case is /share/CACHEDEV7_DATA/.qpkg/NotesStation3\db\mysql\NotesStation3
alter table note import tablespace; /* run after copied backup file to corresponding location on NAS */

4. Update permission
Files uploaded from windows by WinSCP will have a default permission rw-r--r-- (640)
Update to rw-rw---- (660), so "owner" can write to the file.
owner of the files are also required to be 101[101], instead of the value assigned by WinSCP (admin [0])
If the permission is not updated as above, error will be prompted when import tablespace in mysql:
ERROR 1030 (HY000): Got error 194 "Tablespace is missing for a table" from storage engine InnoDB
(There is also a property called group, I just keep it to the WinSCP value administrators [0], which seems to have no impact on the recovery. QNAP use value 102 [102])

5. Check the result
Not need to restart service, open Notes Station 3 and previous data will be avaibable in Notes Station 3



If you need other assistances, please let me know by providing updates.
User avatar
dolbyman
Guru
Posts: 35005
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Recover Old Notes in a new setup

Post by dolbyman »

topoc closed to prevent further necroposting
Locked

Return to “Backup & Restore”