googledatalab / datalab

Interactive tools and developer experiences for Big Data on Google Cloud Platform.
Apache License 2.0
975 stars 249 forks source link

emergency - looking for daily / hourly backup #2091

Open OrielResearchCure opened 5 years ago

OrielResearchCure commented 5 years ago

Hello,

I am looking for code that I was writing for the last few days and didnt checked it in at any point(new notebook)

Based on the bellow explanation, I was looking at gs://myproject/datalab-backups/us-central1-b/... I couldnt find something from Novemeber, all backup names are from October (based on the file name), such as: daily-20181017162736

Please let me know if there is anything that I can do to retrieve the file.

Many thanks, eilalan

https://cloud.google.com/datalab/docs/how-to/working-with-notebooks#cloud_datalab_backup

To restore a backup, the user selects the backup file from Google Cloud Storage by examining the VM zone, VM name, notebook directory, and the human-readable timestamp. Sample backup file path: gs://myproject/datalab-backups/us-central1-b/datalab0125/content/daily-20170127102921 /tmp/backup0127.zip

yebrahim commented 5 years ago

Is the VM gone? What about its persistent disk? If you've saved the file to disk, even if you haven't pushed it to a git repo, it should still be there unless you've deleted the disk too.

OrielResearchCure commented 5 years ago

the VM is available and the persistent disk is available. I used the ungit to check out files that another developer added. At some point I have decided to abort the check out (but probably didnt do it correctly). When the abort was completed, I wasn't able to see the files that I was working on for the last few days. Checking the datalab automatic backups that are available on the gs:// , I could find files that were updated less than a week ago. I am looking for a command that will allow me to copy / view the files that were changed in the last week on the persistent disk.

Thanks, eilalan

yebrahim commented 5 years ago

If you can already find the files on GCS, you can run !gsutil cp gs://myproject/datalab-backups/us-central1-b/... ~/mylocalpath in a notebook code cell to get the archive on your VM.