database sync
  • January 1970 Edit

    I would like to ask to the developers how could I sync the databases since I have installed SI locally and remotely.

    Thanks.
    Pd. I don't always have access to internet when doing the invoices.

  • RubenRuben August 2007

    I would peridiocally run a script on your local system piping the output of mysqldump to your remote system and run a periodic script reading the resulting sql file into the remote DB. Or vice versa, which might be better. If you want to enter data in both si instances independently and have these sync automatically, then you're out of luck, there's no such thing as two-way synchronisation between mysql databases unless you do some very fancy hacking with custom built connectors and funambol-like middleware products. You should pick an si instance that you will be working on, either local or remote and sync it to the other. But it sounds rather pointless if you ask me. If you want a back-up there are better ways of going about it. Good luck.

  • RubenRuben August 2007

    by the way: "hiccup"

  • aljaalja August 2007

    Thanks again Ruben. Seems I will have to do it manually... it doesn't sound an easy task.

    by the way, Salud!

  • justinjustin August 2007

    Hey Guys,

    Hack solution
    - similar to Rubens
    -- after a session on instance 1 - backup the db
    -- on instance 2 drop simple_invoices db and restore instance 1 backup
    -- repeat
    --- its not much fun but you can script it if you want

    Real solution 1
    - Someone with to much time on their hands could make Simple Invoices work offline via Google Gears
    http://code.google.com/apis/gears/
    -- its still in beat and relies on firefox - but its the real solutions
    --- it uses a local sqlite db to store the data locally and syncs up / down

    Real Solution 2
    - someone make Simple Invoices use PDO or similar db abstraction layer
    - use sqlite on offline and online instance
    - use rysnc or similar to sync copies of db

    Cheers

    Justin

    SmarterInvoices.com :: Simple Invoices hosting | Kelly.org.au :: Simple Invoices custom development | justin.kelly.org.au
  • RubenRuben August 2007

    you cannot use rsync to copy the db files because you can never be 100% certain that the db is not in the middle of a transaction without shutting down the database. Although this will work 99 out of a 100 times the 100th time you'll have a corrupted database. A dump and restore is the only way of doing this.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

Categories