From: Michael Preminger on
Hello!

I have been developing a jsp project using eclipse for a while now.

I was very careful, saving the wokspace into a zipped folder from
time
to time.

Today I was trying to recover a recent version, as the development
went astray. I just ditched the current workspace directory, went to
the zip and recovered the "old" workspace into the same directory. I
had not change the state of my PC in any way that (to my
understanding) should affect such a recovery operation.

My disappointment was enormous when I found out that this was totally
failed.

Eclipse started as if I just downloaded it. I had to "import" the
project. The workspace did not seem to maintain a single references
to
any external jar I was using. Everything had to be re-collected.
More than that: It does not even recognize the project as a web
project (which is pure bullshit)
I do not even get to save it as a war.

1. What can be the reason for this non-understandable behavior? Whats
the point in having a workspace?
2. How can I make eclipse accept my project as a web project and let
me save a web archive of it?

Thanks

Michael
From: Lew on
Michael Preminger wrote:
> I have been developing a jsp project using eclipse for a while now.
>
> I was very careful, saving the wokspace into a zipped folder from
> time to time.
>

That's not careful, that's careless. Using a version-control system
like git or CVS is careful.

> Today I was trying to recover a recent version, as the development
> went astray. I just ditched the current workspace directory, went to
> the zip and recovered the "old" workspace into the same directory. I
> had not change the state of my PC in any way that (to my
> understanding) should affect such a recovery operation.
>
> My disappointment was enormous when I found out that this was totally
> failed.
>
> Eclipse started as if I just downloaded it. I had to "import" the
> project. The workspace did not seem to maintain a single references
> to any external jar I was using. Everything had to be re-collected.
> More than that: It does not even recognize the project as a web
> project (which is pure bullshit)

But not really Eclipse's fault.

> I do not even get to save it as a war.
>
> 1. What can be the reason for this non-understandable behavior? Whats
> the point in having a workspace?
>

That's two questions. As for understandability, that's cured by the
answer, which is that you likely did not restore the Eclipse metadata
(stored in a folder named ".metadata"), which can happen if you aren't
sure to notice the file and directory names that begin with
"." ("dot").

The answer to the second question is that a workspace allows Eclipse
to manage your development process.

> 2. How can I make eclipse accept my project as a web project and let
> me save a web archive of it?
>

I'm not sure of the answer to this third question. It might work to
start a brand-new "web" project then copy your work into it.

In future, don't be so careless. Use version control.

--
Lew
From: Arved Sandstrom on
Michael Preminger wrote:
> Hello!
>
> I have been developing a jsp project using eclipse for a while now.
>
> I was very careful, saving the wokspace into a zipped folder from
> time
> to time.
>
> Today I was trying to recover a recent version, as the development
> went astray. I just ditched the current workspace directory, went to
> the zip and recovered the "old" workspace into the same directory. I
> had not change the state of my PC in any way that (to my
> understanding) should affect such a recovery operation.
>
> My disappointment was enormous when I found out that this was totally
> failed.
>
> Eclipse started as if I just downloaded it. I had to "import" the
> project. The workspace did not seem to maintain a single references
> to
> any external jar I was using. Everything had to be re-collected.
> More than that: It does not even recognize the project as a web
> project (which is pure bullshit)
> I do not even get to save it as a war.
>
> 1. What can be the reason for this non-understandable behavior? Whats
> the point in having a workspace?
> 2. How can I make eclipse accept my project as a web project and let
> me save a web archive of it?
>
> Thanks
>
> Michael

In principle this ought to have worked. Lew's advice is sound - if
you're talking "versions" then use real version control. Having said
that, I've occasionally zipped up Eclipse and NetBeans projects and
handed them over to someone else on a stick, and things work just fine.

What happened to you is likely what Lew surmised, that your .metadata
folder didn't get zipped up too. You want to be careful with hidden
files - on any OS - and various tools.

In future, if you're going to entrust important files to *any* kind of
backup - version control and/or archiving and/or pure backup, whatever -
run through the process at least once with a representative small set of
files.

AHS
From: Lew on
Arved Sandstrom wrote:
> In future, if you're going to entrust important files to *any* kind of
> backup - version control and/or archiving and/or pure backup, whatever -
> run through the process at least once with a representative small set of
> files.

The problem is that people think of "backup" and stop there. Backing up isn't
important, restoring is.

Backup utilities used to advertise how quickly they could back up. Problem
was, those fast backups were unusable for restoration. Those utilities could
back up in a restorable way, but the speeds were less than 10% of what was
advertised. I feel quite sure that a lot of people were bitten by that; I
know I was the first time I tried to restore one of those fast "backups".
Luckily I had done what you suggested, a trial run first before losing data.

Remember, you aren't "doing a backup", you are "preparing a restore".

--
Lew
From: Lew on
Lew writes:
>> Backup utilities used to advertise how quickly they could back up.
>> Problem was, those fast backups were unusable for restoration. Those
>> utilities could back up in a restorable way, but the speeds were less than
>> 10% of what was advertised. I feel quite sure that a lot of people were

Jukka Lahtinen wrote:
> OTOH, you probably make those backup copies far more often than restore
> from them.
> I consider the speed of backing up more important than the speed of
> restoring form backups.

So you prefer fast and unusable over slow and safe.

Backups are not that slow and usually unattended. Checkins to version control
are fast.

Backups are not something you should optimize for speed. Your priorities are
insane.

--
Lew