mydbr_sync - Store your reports to version control

(16 posts) (6 voices)

Tags:

  1. myDBR Team, Key Master

    Hi,
    myDBR Team is happy to announce the the availability mydbr_sync, a tool which eases up the task to keep myDBR reports under a version control.

    mydbr_sync ja a Java-based tool that knows it's ways around myDBR database and extracts the relevant data from the server and allows you to check in your changes to a version control system from your local system. You can now work freely in the server and when you are done, run mydbr_sync and check in the changes / new reports you have done.

    How to use:

    • Download mydbr_sync
    • Create an empty directory for your project
    • Launch mydbr_sync from the command line
    • mydbr_sync will ask you required information, logs in to your server and extracts the report to your local machine
    • mydbr_sync will create a settings file mydbr_sync.properties for customization

    mydbr_sync is available for Premium license holders.

    Happy reporting,
    --
    myDBR Team

  2. duane, Member

    Great stuff!!

    I didn't have java on my linux box (amazon hosted) before, so I did a 'yum install java' and everything seemed fine. However when i tried to run the backup the following error occurred:

    # java -jar mydbr_sync.jar mydbr_sync.properties Exception in thread "main" java.lang.ClassFormatError: com.taikala.mydbr.MyDbrSync (unrecognized class file version) at java.lang.VMClassLoader.defineClass(libgcj.so.8rh) at java.lang.ClassLoader.defineClass(libgcj.so.8rh) at java.security.SecureClassLoader.defineClass(libgcj.so.8rh) at java.net.URLClassLoader.findClass(libgcj.so.8rh) at java.lang.ClassLoader.loadClass(libgcj.so.8rh) at java.lang.ClassLoader.loadClass(libgcj.so.8rh) at java.lang.Class.forName(libgcj.so.8rh) at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:56)

    Is there a particular java version I should install? Any additional modules? I'm not a linux expert so am not sure what is wrong, but can make it work if given clear instructions :-)

  3. myDBR Team, Key Master

    Hello Duane,

    mydbr_sync has been tested with the Sun's official Java distribution, and it looks like the java version you installed is not compatible with the official distribution.

    To install the Sun's Java version please first uninstall the java you currently have, i.e. yum uninstall java and then install the correct version as follows:

    apt-get install sun-java6-bin

    After that you should be able to run mydbr_sync.

    Best Regards,

    myDBR Team

  4. duane, Member

    Unfortunately that doesn't work on red hat (I installed apt but even so it didn't work). Guess I'll just leave it for now.

  5. myDBR Team, Key Master

    You can find Java installation instructions also from Oracle:

    http://www.java.com/en/download/help/linux_install.xml

    Depending where you want to have the reports stored (version control) and if you have an hosted server, the other alternative is to open an SSH tunnel to server and run mydbr_sync from your local machine throught the tunnel. This way you get the files stored directly to your own machine.

    --
    myDBR Team

  6. vboccalate, Member

    can I understand better how I have to install it locally.

    If I have to run it through SSH do I have ot prlace the mydbr_sync files into a specific directory or into a mydbr directory?

    thanks

  7. myDBR Team, Key Master

    Hi,
    To sync the reports from remote server to your local machine you can do following:

    Open the ssh tunnel to server:

    % ssh -L3309:localhost:3306 myusername@myserver.com

    This will create a SSH tunnel to server allowing to access remote MySQL as it would be local. The port for the remote server is in this case 3309.

    Now make sure you have Java 1.6 installed in you local machine and that you have mydbr_sync downloaded. Go a directory where you wish the objects to appear and launch mydbr_sync from your local command prompt:

    % java -jar PATH_TO_MYDBR_SYNC/mydbr_sync.jar

    Now that mydbr_sync asks your connection (only at first time) info you give:
    - Database host address: localhost
    - Database port number: 3309

    mydbr_sync reads all your reports, procedures, functions and views from myDBR database and stores them in organized structure. This directory is then easy to commit into your version control system. mydbr_sync stores your settings to a local file, so next time you do the sync, you just need to repeat the command and sync will happen.

    --
    myDBR Team

  8. vboccalate, Member

    dear sir

    we do have to sync mydbr sql file on remote lnx server.

    however then we need to put it back locally on XAMPP localhost.

    I'm not sure I can upload on remote lnx machine the mydbr_sync running it through putty SSH for instance.

    however can you only advice if the file to run .jar is located in mydbr_sync folder and where

    thanks

  9. myDBR Team, Key Master

    There are two different tasks here.

    If you wish to duplicate the remote server's myDBR setup to local machine, the easiest way to do it is using database backup. Dump the database (with procedures in MySQL) and load it to local machine.

    With mydbr_sync you can grab the changes made to the reports/other objects on server and put them into version control.

    mydbr_sync is not installed on server, but run locally. You can download the mydbr_sync.jar from http://mydbr.com/download and place it anywhere you like in your local machine.

    --
    myDBR Team

  10. cdavison, Member

    Is there a way to specify the user/pass each time as in input? I am running this script from an AWS EC2 instance and I don't want to save the user/pass in clear text so I want to grab it from a secrets manager instead.

    For example, I woudl like this as an option...

    java -jar mydbr_sync.jar SyncThis_sync.properties password=TheActualPassword user=TheActualUser

  11. myDBR Team, Key Master

    We can take a look at it.

    --
    myDBR Team

  12. myDBR Team, Key Master

    With the latest version of mydbr_sync, you can now set parameters from the command line (optionally overriding the ones from the .properties file):

    java -jar mydbr_sync.jar SyncThis_sync.properties -uTheActualUser -pTheActualPassword

    --
    myDBR Team

  13. cdavison, Member

    Thank you! This is exactly what I needed to back up all of my reports without storing the user/pass in clear text on the PC.

  14. jptreen, Member

    Hi! The version available on your website reports as 1.2.4 rather than the 1.3.0 (which is the version the documentation that comes with it has).

    Is the uploaded version actually the 1.3.0 version?

    Also, I've been having issues with mydbr_sync connecting to MySQL 8 (I did not previously have issues with versions of MariaDB I tried, which still has mysql.proc and mysql.func, which MySQL 8 doesn't). Is this to be expected or do I need to search more deeply for a solution at my end?

  15. myDBR Team, Key Master

    The updated 1.4.0 version fixed the problem with MySQL 8.

    --
    myDBR Team

  16. jptreen, Member

    Ah, lovely, I see the updated version is live on the site now. Many thanks!


Reply

You must log in to post.