Zen Cart Logo
Forums / General Questions / Offline Development

Offline Development

Locked

Views: 2,081

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
27 May 2006, 16:12
#1
afrizzle avatar

afrizzle

New Zenner

Join Date:
May 2006
Location:
Philippines
Posts:
14
Plugin Contributions:
0

Offline Development

I have an online zencart but at the moment I wanted to do the developement of zencart offline, 'coz its not possible to do it online at the moment.

I was able to install the offline zencart and everything but I cannot make the database similar with my online one. How can I synchronize my online database with the offline, currently I only have the demo products offline.

Could somebody help out with this.

Thanks a lot!

27 May 2006, 17:35
#2
lep avatar

lep

New Zenner

Join Date:
Apr 2006
Location:
Menlo Park, CA
Posts:
44
Plugin Contributions:
0

Re: Offline Development

afrizzle --

What I do is to 'backup' the MySQL database on my web server daily using cPanel (which places a copy of the file on my desktop), then 'import' that file into my local machine. It's worked without a hitch so far. I'm sure other web site management tools have a similar backup capability; check your documentation, or ask your hosting company.

It's not really synchronization -- more like periodic delete & replace. But since I only want changes to flow one way, it serves the purpose.

This has the extra advantage of leaving me with an off-site backup of the store's database, which could come in handy some day. So I change the backup file's name to include the date & stash it away. The files are tiny, under 100kB for my site, so having a bunch of them really doesn't take up much space.

-- Larry

29 May 2006, 13:05
#3
afrizzle avatar

afrizzle

New Zenner

Join Date:
May 2006
Location:
Philippines
Posts:
14
Plugin Contributions:
0

Re: Offline Development

Larry,

Thanks for the reply, I also backup my database but using phpMyAdmin
Export
with the following default selections:

  • SQL
  • Structure
  • Add AUTO_INCREMENT value
  • Enclose table and field names with backquotes
    -Data
    -Use hexadecimal for binary fields
    Export type : INSERT
    -Save as file
    Compression : None

But everytime I "IMPORT" the sql file to my offline database it prompts an error something like " the database name already exist" and there is no option to overwrite.

Please tell me if there is something wrong with the way I Export my database and how will I ba able to use the online database on my offline zencart.

Thank you very much

Fritz

29 May 2006, 14:28
#4
lep avatar

lep

New Zenner

Join Date:
Apr 2006
Location:
Menlo Park, CA
Posts:
44
Plugin Contributions:
0

Re: Offline Development

afrizzle --

Unfortunately, I don't know enough about SQL, mySQL or PHPmyAdmin to give a detailed explaination of what's going on with you. But here's what's happening on my end.

When I 'backup' the database, cPanel creates a gZip file on my desktop. It's a compressed ASCII file, which can be decompressed & then opened in a text editor. Looking inside, it consists of a number of sections, all beginning with something like:

DROP TABLE IF EXISTS blah_blah_blah;
CREATE TABLE blah_blah_blah (
various sql commands
) TYPE=MyISAM;

I believe this means that the database is being deleted, and then recreated anew, section by section. Importing this file, either remotely or locally, seems to result in a completely remade file, with no traces of whatever messing around I've done since the backup was made.

You might want to peek inside your backup file & check the actual commands. Verify that it can be used to restore the database on the remote machine as well as the local one. After all, that's the main reason to have one.

Once you have a backup that can be restored remotely, I'm sure it'll also work locally.

-- Larry

29 May 2006, 15:21
#5
cr33dog avatar

cr33dog

New Zenner

Join Date:
Dec 2005
Posts:
50
Plugin Contributions:
0

Re: Offline Development

afrizzle -

Try checking the two boxes "add drop table" and "add if exists" when you export from phpMyAdmin.

Alternatively, whack (drop) all of the tables in your offline DB before importing...

HTH,
Chris