Jump to content


How to recover previously shelved files

shelves

  • Please log in to reply
10 replies to this topic

#1 SergeyN

SergeyN

    Member

  • Members
  • PipPip
  • 29 posts

Posted 10 April 2014 - 01:16 AM

Hi

I've screwed up merging unshelved due to some really strange error and realized my shelved files are gone. Is there a way to recover them ?

Thanks.

#2 P4Matt

P4Matt

    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 10 April 2014 - 04:24 AM

I'm afraid not. If you are using P4V I highly recommend disabling the checkbox that removes the shelved files from the changelist upon unshelving. I'm a firm believer it is always better to manually delete those shelved files when the time comes to submit.

#3 SergeyN

SergeyN

    Member

  • Members
  • PipPip
  • 29 posts

Posted 10 April 2014 - 11:12 AM

>I highly recommend disabling the checkbox that removes the shelved files
Yeah, I've learned that the hard way ;).
It'd be nice to have a history of shelves stored somewhere for some time. I don't like manual deleting since it looks more like a clik-fest game Diablo3 would be jealous about. But better safe than sorry, thus a some sort of history of recently tossed shelves would be a handy feature.

Thanks.

#4 Mailman Sync

Mailman Sync

    Advanced Member

  • Maillist Aggregator
  • 2495 posts

Posted 10 April 2014 - 11:15 AM

Originally posted to the perforce-user mailing list by: Patrick Slattery


What I had setup at my previous job was volume snapshots at 15 minute intervals for 8 hours for the depotdata volume on the NetApp that hosted that volume, that way if a user deleted their shelf inadvertently I could scan the log and see when they did it then mount up the snapshot for that time interval and copy out the gz's of the files they reverted.
This would be even easier to setup if one were to use NFS and user visible snapshots on the NetApp for the depotdata volume. Or better yet use a ZFS volume.

Sent from my iPhone

Quote

On Apr 9, 2014, at 9:20 PM, SergeyN <perforce-user-forum@forums.perforce.com> wrote:


Posted on behalf of forum user 'SergeyN'.

Hi

I've screwed up merging unshelved due to some really strange error and
realized my shelved files are gone. Is there a way to recover them ?

Thanks.



--
Please click here to see the post in its original format:
http://forums.perfor...y-shelved-files
_______________________________________________
perforce-user mailing list  -  perforce-user@perforce.com
http://maillist.perf...o/perforce-user
_______________________________________________
perforce-user mailing list  -  perforce-user@perforce.com
http://maillist.perf...o/perforce-user



#5 SergeyN

SergeyN

    Member

  • Members
  • PipPip
  • 29 posts

Posted 10 April 2014 - 11:24 AM

Thansk for your advice. Will definitely keep this in mind when I gEt a bit bigger scale. But that just proves the need for such a feature.

#6 Tank

Tank

    Advanced Member

  • Members
  • PipPipPip
  • 112 posts

Posted 10 April 2014 - 04:15 PM

Moving over to streams and using task streams would avoid all that tbh, just keep committing your files on task streams and shelve if you want someone else to grab them then you don't need to worry about recovering them.  Not much use with none streamed depots of course.

#7 SergeyN

SergeyN

    Member

  • Members
  • PipPip
  • 29 posts

Posted 10 April 2014 - 04:24 PM

I've yet to learn what is the real difference between all those stream types. My sitation was is that I realized the change is going to be bigger than it should be for the release stream, so I decided to move the partially done code to a development stream and go on there, and screwed up doing so.

#8 P4Matt

P4Matt

    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 10 April 2014 - 04:59 PM

Were your development and release stream connected? Or do they have a stream I between them? The unshelve using stream requires one stream to be a child of the other. If there aren't directly related Perforce can't calculate the relationship between the two.

#9 SergeyN

SergeyN

    Member

  • Members
  • PipPip
  • 29 posts

Posted 10 April 2014 - 05:01 PM

It was intended to be a mainline->development stream transfer

#10 P4Matt

P4Matt

    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 11 April 2014 - 09:20 PM

Hmmm, definitely something amiss then. It might be worth trying the process again on a test change so we can get the error message.

#11 Steve Munyan

Steve Munyan

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 09 May 2014 - 01:36 AM

Sorry that I am a bit late to the party...

There is a unsupported way to get lost shelved files back if you do regular backups of the system containing your Perforce depot.  The shelved files are stored in zip files in directories in the depot tree on the server.  You can recover the zip file from an earlier backup tape.

I've used this technique to recover important shelved file that have been lost.  Drop me a note if you need more info.

Steve





Also tagged with one or more of these keywords: shelves

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users