Sync Xampp Portable with Xampp on desktop

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Sync Xampp Portable with Xampp on desktop

Postby carltonb » 06. April 2007 20:35

How can I sync my desktop with my portable version.

Thanks
Carlton B
carltonb
 
Posts: 6
Joined: 22. December 2006 14:01

Postby Codesmith » 06. April 2007 22:07

You can copy the database and htdocs folders, same with the .ini files if those have changed.

Probably write a quick batch file to move whatever you need moved.

Or do you need something more complex than that?

Like apply changes from A to B as well as B to A with conflict resolution?
Codesmith
 
Posts: 101
Joined: 31. March 2007 21:11

Postby carltonb » 06. April 2007 22:16

Thanks for the reply.
Like apply changes from A to B as well as B to A with conflict resolution?


I would think this is what I would need. Can you explain to me how I might be able to do this.

Why I am asking is that on the one site I am working on the group of us have a meeting and decide what needs to be changed on the site. I like to take the data on my usb drive. Then go home and be able to upload the changes the committee made.

Thanks

Carlton Brooks
carltonb
 
Posts: 6
Joined: 22. December 2006 14:01

Postby Codesmith » 07. April 2007 17:45

No, because I never learned how to do it myself. ;)

My solution to keeping data in sync is to just keep the data in one place. Its good for programming and good in real life.

I would probably just run my home server off the thumb drive, backing up its contents often.

Or I would run the development server inside a virtual machine and move that back and forth using one of those new 8 GB thumb drives or an external hard drive.

Or I would work directly on the home PC during the meeting.

But thats just the way I would do it.

You could just make overwrite all the content on the thumb drive with that of the home server whenever you go to meetings, then do the opposite when you return.

That way there is just one definitive copy at a time.
Codesmith
 
Posts: 101
Joined: 31. March 2007 21:11

A middle way

Postby hansBKK » 22. April 2007 13:47

So far the choices presented have been:

1. Have a "production" server setup of XAMPP in one place and a "portable working" version in another (any place, including a thumbdrive), and figure out how to manually keep them in sync (or semi-manually via a script that needs to be kept up to date)

2. Run your server from a portable version on a thumb drive (so you'd have to take your server down in order to take the thumb drive to a meeting to modify the content?)

Here's what I do - and I'll speak more generally about how I manage all my portable apps and my data, not just XAMPP. I only use the thumb drive as a transport mechanism, the only time I'd actually run anything from there would be if I were someplace where I didn't have access to any of my own computers and couldn't or didn't have time to sync the thumb with whatever machine I was using. So from now on, assume I'm working on one of my usual working machines - work desktop, home desktop, girlfriend's desktop, notebook, whatever.

My normal practice is to log on the machine, insert my USB stick. My portable "Start Menu" pops up, I just exit from that and it automatically syncs with that machine's copy of my directory structure (tree) and (also automatically) does a safe eject. I remove the stick, have a session working/playing on that PC (now using the local version of that portable "Start Menu" and my 40+ portable apps); when I'm done, I just insert the thumbdrive, sync the changes back, remove the stick and log out.

Only the changes get sync'd so it's usually pretty fast, maybe a minute or two unless I've been tweaking graphics. It helps having a fast thumbdrive of course, I'm very happy with my Kingston "Migo", but that's only 2GB, so I also have a superset 8GB which I use for less frequently needed data sets (it's MUCH slower, maybe twenty minutes to do a full sync).

I always have at least two copies of my current apps config and data set - on my thumb and on the last machine I worked with. And I have further backups of less current sets on the other machines - automatic off-site redundancy.

I'm always working at full hard-drive speeds, not at my thumb's much slower speeds. I'm also not wearing out my thumb writing to it more than necessary.

I use PStart as my menu, APO Usb Autorun 1.5 to auto-launch that menu, SyncBack freeware to do the sync'ing, RemoveDrive to auto-eject when I'm done, and a whole chain of autoexec.inf/batch files/autoexec on exit routines to make it all happen automagically.


I've started using Subversion to manage my xampp installation so I don't have to worry about upgrading to the latest xampp / wordpress / drupal etc. affecting my customisations. Maybe another time. . .

Hope this is helpful. . .
hansBKK
 
Posts: 6
Joined: 22. April 2007 12:33
Location: Bangkok

Postby Codesmith » 22. April 2007 17:39

I also just started using version control myself (CVSNT Server & TortoiseCVS).

The server setup was more difficult than I expected, but it was worth it.

PS I made a note to try out Sync Back and RemoveDrive :)

PPS you can also use ToroiseCVS for version control without setting ua a CVSNT server. It can create and use local repositories.
Codesmith
 
Posts: 101
Joined: 31. March 2007 21:11

Using Subversion to manage XAMPP

Postby hansBKK » 23. April 2007 02:43

I found Subversion a piece of cake to setup, and very well documented for newbies to CVS.

Getting XAMPP to act as a properly configured WebDAV server with the Subversion-specific modules was a bit more of a challenge, but now everything's working OK.

Of course in order to actually STORE your XAMPP install INSIDE a Subversion repository, everything needs to be shut down, but there's a built-in Subversion server that uses its own svn:// protocol that's very easy and efficient to use.

I used Tortoise as a front-end via the Win Explorer shell extensions, but with such a large data set I found its cache feature slowed things down too much, so I'm looking for another GUI - but for now the command-line client tools are fine, and actually help you understand what's going on better than using a GUI.

Amazing thing is, with 53 versions of my XAMPP installation stored, total over 4 GB if I'd manually backed up every one to a normal file system, the TOTAL diskspace used storing it in Subversion is 90MB, with every file capable of being looked at/diff compared/resurrected from any of the 53 revisions!

It stores everything compressed, and only the differences from the original import of the tree (even binaries).

TOTALLY recommended for managing ANY program where you'd be hesitant to upgrade to the latest and greatest because of customisations - CMS, blogging tools whatever, very cool backup tool!
hansBKK
 
Posts: 6
Joined: 22. April 2007 12:33
Location: Bangkok

Postby Codesmith » 24. April 2007 02:27

I use CVS for version control on all the config files and for all my present and past projects.

CVSNT Sever was a pain to setup, and I would have preferred to install Subversion, but the project I want to contribute to uses CVS (as do the majority of projects).

My Development server is run from inside a virtual machines, and I tend to use snapshots to maintain different software stacks.

For example in under 3 minutes I can step back to a clean install of XP and install Zend Platform 3.0 for server debugging PHP versions 5.2 and up, while still preserving my current environment unchanged.



And I have the freedom to move my development environment from machine to machine.

----
Codesmith
 
Posts: 101
Joined: 31. March 2007 21:11

Queried in private message

Postby hansBKK » 30. May 2007 09:35

I like what you have done I believe that this is what I am looking for to manage my work.

I would like to ask a few questions. Can you explain how you have integrated the subversion, and would you be willing to share some of the .bat files so I can get an idea of how items are being handled.

----------------

Your first question is a bit general, so here is a general answer to that:

I set up a repository, set up to handle "vendor branches" along with the standard TTB structures. Configured the svn server so I access it via svn://localhost/.
Downloaded and installed virgin XAMPP + Perl, committed and tagged. Set SVN to ignore the kruft generated by running the servers, editing files (logs, backup files, etc). Deleted the original install and did a checkout back into the same place.
Did my basic configuration changes to handle the various virtual hosts, tested everything committed and tagged. Copied in all the content directories from my old installation, tested everything committed and tagged.
From then on: make changes, test, commit tags for major milestones.
Bring in a new vendor branch (e.g. Drupal) over a check out of relatively virgin tags so I can re-use them for different setups later.

Enough of that for now - visit the subversion forums for further help on this - make sure you read "The Book" well and search there first of course.


Regarding my batch files - please just use them as samples for understanding the process.

APO installed, runs autorun.inf
[autorun]
OPEN=\autoexec.bat
ICON=PortableApps\PStart\PStart.exe
ACTION = Usb-Menu

which runs the autoexec.bat in the root of the flash drive
@ECHO OFF
subst H: /D
Start "close me" PortableApps\PStart\PStart.exe
exit

My host computer is set to SUBST "map" drive H: to the "root" location on my filesystem where my flash drive data gets replicated.

I also have H: set (in XP "manage computer") as the fixed drive letter of that flash drive.

So when I insert my flash, the autoexec "un-SUBSTs" the drive letter mapping so the flash drive real root shows up in the same location.

As I do this on all my computers (work, home, notebook) in theory I can run all my portable apps and access my data in all the same path locations when the drive is inserted or not. In reality I never actually run anything from my thumb drive unless I'm on someone else's computer.

Note the actual filesystem locations are different on different machines.

However, my RemoveDrive program location is always the same, and I've got PStart configured to run this batch file on exit:

C:\Program Files\RemoveDrive\STOP!.bat
@ECHO OFF
REM Note this batch file must be executed AFTER PStart has exited, and from a location on the harddrive (C:\Program Files\RemoveDrive\)
REM Also, the letter will change from one machine to another, and if you have APO running you don't need the pause to confirm the drive's been safely removed
subst /D G:
G:\aasync\little\PortableApps\Syncback\SyncBack.exe
removedrive G:
subst /D H:
H:\PortableApps\Syncback\SyncBack.exe
removedrive H:
subst /D X:
REM pause

Oh I didn't tell you I have multiple thumb drives setup, with the smaller (faster) one actually a subset of the bigger (slower) one. But it doesn't make things much more complicated.

Note this file calls SyncBack from the thumbdrive itself, so if it isn't inserted it just flashes an error and runs through the rest of the batch.

So the workflow - start one of my computers, the local PStart menu launches. If I know I have more recent data (from another of my computers) on one of my thumbs, I just exit out from PStart (un SUBST'ing any mapped drive letters), insert the thumb drive and it launches its PStart menu (which is kept in sync along with everything else of course). I just exit out of that and SyncBack starts up, I start a replication from the thumb to the local drive and when it's done, exit from PStart and the thumb is automatically safe-removed.

Re-start the local PStart (hot-key tool) with a batch that re-SUBSTs everything and I'm working in my usual portable working environment with an up-to-date fileset. Work work work. Before shutting down that machine, exit the local PStart, insert the thumb, it fires up PStart, I exit that and SyncBack from the local fileset back to the thumbdrive.

Next time I want to work on one of my machines, insert the thumbdrive (loop to above).

I haven't completely refined the process, basically stopped once everything was working well enough.

The only problem comes when you are working on multiple machines at the same time - have to be careful with your SyncBack settings to make sure you don't wipe out a subset of your work.

But if you do everything properly, then all your working files are constantly being backed up to multiple machines in multiple locations - backing up your data becomes integrated with your normal workflow.

And with CVS or Subversion you can also roll back any changes to previous versions.

And I didn't mention that my biggest machine (at work) is also running Ghost in the background so if I mess things up I can get previous versions of the files back from there.

I so much wish I had started working like this twenty years ago, I've lost so much data by relying on manual backups in the past <sigh>

Hope that's enough to get you started. . .
hansBKK
 
Posts: 6
Joined: 22. April 2007 12:33
Location: Bangkok

Postby Codesmith » 30. May 2007 14:06

Bit off topic, but I just discovered the usefulness of using both Subversion and CVS at the same time.

Lets say you are working on a group project. On the one hand its nice to commit whenever you make changes, on the other hand you don't want to commit any code to the group's repository until its in a finished state.

So you use the groups CVS server, but also add the project (including the CVS folders) to your own personal Subversion server.

Works in progress get committed to your personal version control.
When its finished, you commit it to the groups version control.

As long as one system is Subversion and the other CVS there is no conflict.
Codesmith
 
Posts: 101
Joined: 31. March 2007 21:11


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 45 guests