#22 ✓resolved
Daniel Clem

Won't recognize my database.

Reported by Daniel Clem | October 18th, 2011 @ 03:29 AM

I was contacting you on Facebook about how to set Piggydb to sync the database using Dropbox to other computers. Eventually I got to editing the application.properties file in to have the database be in my Dropbox folder. I use nothing but Ubuntu Linux systems, so the path I set was "/home/danny/Dropbox/Piggydb/piggydb"
After that, it was starting up just fine and I made a couple of test fragments. Teaching my self how to embed images, other contents fragments, and youtube videos. It was working great. But after restarting my computer for an unrelated reason, and starting Piggy again. Its not recognizing the database I made. I start it up, and the I had renamed it to "Daniel's Piggydb" if that helps. None of these notes I took were of any real importance. But it really concerns me if I can lose a whole database of notes, even though none of the files were deleted. I even tried doing a database "restore, but it only accepts xml or .pig files, not the .h2.db file.

Any help would be much appreciated. God Bless,

Daniel

Comments and changes to this ticket

  • Daniel Clem

    Daniel Clem October 18th, 2011 @ 03:37 AM

    I meant, the data base that won't recognize was named "Daniel's Piggydb", I renamed it in the system tab when the server was running. It worked cause at the top of the web page showed the updated name. And when I look in my Dropbox, the database files are named "Daniel's Piggydb.h2.db" and "Daniel's Piggydb.trace.db" But I have no idea how to get Piggydb to use these files. I decided to use this website to get support just cause Facebook seems more for compliments and simple little issues.. So when this issue is solved, then others can search here and find this ticket and fix their issue without needing to actually contact you.

    Thank You for any help you can give.

  • marubinotto

    marubinotto October 20th, 2011 @ 08:56 AM

    • Assigned user set to “marubinotto”

    Could you show me your application.properties?

    Please note that the "Database Title" that can be set in the System menu and the "Database Name" that can be set in application.properties are unrelated to each other.

    A "Database Title" is a label for the content and used for the HTML title as you wrote. A "Database Name" is used internally for the database file name and won't affect the appearance of the content.

    So you don't have to use the same name for both. Rather, you should not change the database name unless you want to manage multiple databases.

  • Daniel Clem

    Daniel Clem October 20th, 2011 @ 06:53 PM

    I have attached the file. I didn't know that changing the data base file in the application.properties file weren't related to the name set under the system tab while viewing the server in the web interface. I just wanted to change the Name that shows for a small level of personalization. But more important to have the Dropbox syncing work properly for now though lol.

    So to have another server on a different machine recognize the database in a Dropbox folder, I have to leave the database name the same in both the properties file and in the running server, and then set the database path in the properties file on the other computer to be that same Dropbox folder right? Sorry if I confused you :-/

  • marubinotto

    marubinotto October 21st, 2011 @ 11:47 AM

    I just wanted to change the Name that shows for a small level of personalization.

    In that case, you need to just change the "Database Title" in the System menu, which will be stored in the database.

    As I wrote above, the "Database Name" (piggydb.database.name) in application.properties will be used for the database file names, and your database name "Daniel's Piggydb" might not be a good name for files in some environment. So if it causes a problem, you should change the name to the default or an appropriate name for files.

    So to have another server on a different machine recognize the database in a Dropbox folder, I have to leave the database name the same in both the properties file and in the running server, and then set the database path in the properties file on the other computer to be that same Dropbox folder right?

    You need to config "piggydb.database.prefix" (database directory) and "piggydb.database.name" (database file name) so that the Piggydb servers on your different computers refer the same database files on Dropbox. While the database names should be the same to share the same files, the database directory paths depend on the Dropbox settings.

    For example:

    • System menu
      • Database Title => "Daniel's Piggydb"
    • application.properties
      • piggydb.database.prefix => the path to the database directory in the Dropbox folder
      • piggydb.database.name => "piggydb" (the default database name)
  • Daniel Clem

    Daniel Clem October 27th, 2011 @ 02:55 AM

    !!! That fixed it :-D

    I actually just made a whole new database cause the other one "Daniel's Piggydb" was mainly just a starter teaching my self all the embedding tricks I didn't have any notes that were too important. Just I really wanted to have it sync, but didn't know what I was doing wrong, and I didn't want to make 3 or 4 different databases trying to figure it out.

    A helpful side note, after your reply I took that info and first tried doing it with Ubuntu One, Cause I've been trying to move everything over to Ubuntu one for security concerns with Dropbox and cause Ubuntu One is open source. So I made a copy of the database from Dropbox to a folder in Ubuntu One , then made the application.properties file to be just like you said. But it didn't work. The server started and I could open the web interface. But the notes weren't there. And when going to the directory path I specified, there wasn't any "new" database files. just the same one that hadn't been changed. I don't know where the server was putting that database thought. But I assume it was cause Ubuntu One is 2 words, and alot of other programs I use don't recognize directories with folders named with 2 words. Sometimes putting quotations marks fixes this issue, but when putting quotation marks around the directory path in the application.properties file, it just caused the server to have an error and not start at all. I don't know if this is a bug, or I just don't know how to type out this kind of directory. Just wanted to let you know that in case others might have the same issue and not wanna use Dropbox.

    But its not too big of a deal for me, cause it works great with Dropbox. And and with the database being so small, the syncing is almost instant :. :-D

    Bit off topic and I can make it a new ticket if you like. But under Gnome 3.2 in Ubuntu 11.10 Piggydb doesn't show up in the system tray / notification area. But in the stock Ubuntu desktop that uses Unity, It shows just like normal. But this is most likely an issue with how Gnome 3.2 is still in heavy early development and over hauling the desktop to modernize it. I don't know if you are a Linux user or follow Linux development. But just thought I'd give you the full scoop on my experience so far.

    Thank you for ALLLLL the help. God Bless you and your work. Your doing a great job on Piggydb :-D

    Clem

  • Daniel Clem

    Daniel Clem October 27th, 2011 @ 04:05 AM

    Oh I forgot to ask, how can I stop or "Shutdown" Pidggydb from the command line? Cause with the icon not showing in the system tray, I have no way to stop the server other than restarting the machine. And I am going to try and make sure not to have more than one Piggydb running at the same time.

  • marubinotto

    marubinotto October 29th, 2011 @ 12:31 PM

    Hi Daniel,

    Thank you for sharing your experience and the useful info.

    I don't know where the server was putting that database

    You can check the actual database path in the System/System Info page.

    I assume it was cause Ubuntu One is 2 words

    That should be no problem. I think it might be another configuration problem. Could you check the actual database path in the System/System Info page and whether the database files exist in the path?

    how can I stop or "Shutdown" Pidggydb from the command line?

    Find the Piggydb process with the ps command and just kill it.

  • marubinotto

    marubinotto November 14th, 2011 @ 08:13 AM

    • State changed from “new” to “resolved”
  • Daniel Clem

    Daniel Clem November 15th, 2011 @ 07:35 AM

    Yea its technically solved. I was going to try and test the Ubuntu One Sync. But I only have one real Ubuntu computer right now. So I can't accurately test that the syncing is working properly cause I don't have UbuntuOne on more than one machine. My other 2 Machines run ElementaryOS. So when I upgrade all my computers to Ubuntu 11.10, I'll either come back here or make a new ticket.

    Thank You for all the help on syncing Piggy!!! On a side note. Is there any plans on integrating syncing with other computes in future versions of PiggyDB? Either with integrating with UbuntuOne or Dropbox, or having your own service?

    God Bless you and ALLL your work!! :-D

      Daniel
    
  • Daniel Clem

    Daniel Clem November 15th, 2011 @ 08:26 AM

    oh shoot I forgot, doing the ""ps"" ommand didn't show anything. :-( I included a picture of what the ps command actually shows me. Its not a huge deal. But is more of an annoyance to not have an easy way to stop the server when under Gnome 3. And sort of a bug report if its considered a bug. Thank you for working so hard to support all these platforms. REALLY shows that open source can be just as hard working as any big name closes teams :-)

  • marubinotto

    marubinotto November 21st, 2011 @ 01:47 PM

    Is there any plans on integrating syncing with other computes in future versions of PiggyDB?

    Well, that is unlikely because, as I wrote before, Piggydb is implemented as a server. The database can be shared naturally via http access. Sharing it using syncing service such as Dropbox is a kind of a trick, and it is difficult to ensure that it always works properly.

    doing the ""ps"" ommand didn't show anything

    Could you try "ps ax"? It'll show more processes and the name of the Piggydb's process should contain "java".

    But is more of an annoyance to not have an easy way to stop the server when under Gnome 3. And sort of a bug report if its considered a bug.

    Sorry about that, but this is a limitation of the Piggydb standalone package. Because it depends on the Java feature to access to the system tray, if it doesn't work, I can't do anything about it.

  • Daniel Clem

    Daniel Clem November 21st, 2011 @ 08:35 PM

    Mkay, at this point in my life, I don't have a job and can't afford to purchase and keep the subscription of a domain. Eventually I'd really like to. But use my own home server so to keep my own data under my control and ownership. But it seems it will be a long while till then. So I'll try to cope with the disadvantages of Dropbox for now.

    On the "ps ax" command, it worked!, I can see the process then. I've attached a picture, mainly to show how it's displayed and that it worked. But I tried looking at the man pages to find out how to actually select a process and then quit it or force quit it if needed. But couldn't find out anything in the man pages :-( I'm happy that its very clearly labeled using the same command I used to run it though.

    And bout the system tray, I did notice that though the icon shows up in Ubuntu 11.10 under Unity, but when right clicking it, it does do anything. And when running other apps in the system tray. They also don't act right. But Ubuntu and Gnome Shell both use a new updated version of the Gnome desktop and panel, so OpenJDK probably hasn't been updated to the new specs, and Gnome 3.x is still in heavy develpment, so its possibly they didn't think about how java and other apps would interact with the system tray.

  • marubinotto

    marubinotto November 22nd, 2011 @ 11:34 AM

    But I tried looking at the man pages to find out how to actually select a process and then quit it or force quit it if needed. But couldn't find out anything in the man pages :-(

    You can terminate a process with the "kill" command.

    http://www.cyberciti.biz/faq/kill-process-in-linux-or-terminate-a-p...

    In the picture you attached, the piggydb process is "java -jar piggydb-standalone.jar" whose PID is 25757. So just execute the following command:

    kill 25757

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Piggydb is a Web notebook application that provides you with a platform to build your knowledge personally or collaboratively.

Shared Ticket Bins

People watching this ticket

Attachments

Pages