Quantcast
Channel: Backup and restore
Viewing all articles
Browse latest Browse all 6586

Re: Restoring/downloading files over 2GB

$
0
0
by Ken Task.  

Does your unzip give you anything at all?  Any files/folders?

IF not, there is a MacOSX command line utility that will attempt to recover what it can from a renamed .mbz (to .zip) called 'ditto'.  From terminal on the Mac box, 'man ditto' will show all the options/switches.

Have been working with a user that has similar issues with hosting provider and corrupted zips.  As a result of that, have discovered that ditto will recover some ... but not all ... resources/files from the zip.  Therefore not a total loss.

In a work folder and from the command line in that folder:

ditto -x -k backup-moodle2-course-3-tech-20130407-1400-nu-noattend-noquiz.zip extracted

The 'extracted' is a folde that ditto will create when attempting to recover.

It, too, will fail with an error like:

ditto: files/f0/f064fabdcf36f97bec8075102850fa814e59feec: No such file or directory
ditto: Couldn't read pkzip signature.

**BUT** if one checks out the 'extracted' directory in that same folder:

Ken-Tasks-MacBook-Pro:nubackup ktask$ ls -l extracted
total 8
drwx------  49 ktask  staff  1666 Apr 11 12:43 activities
-rw-------   1 ktask  staff    79 Apr 11 12:42 completion.xml
drwx------   8 ktask  staff   272 Apr 11 12:43 course
drwx------  73 ktask  staff  2482 Apr 18 09:19 files

Now the 'fun' begins ...

This is NOT a complete extract ... there is no moodle_backup.xml file for one - therefore attempting to archive backup up what has been recovered will NOT restore to Moodle.

The files folder is a mini of filedir on the server and should have contained all the uploaded files in the course.  Unfortunately, there is no associated files.xml file (which maps the directories/contenthash filenames in the 'files' folder).   But, one can get an idea of which contenthash file is what:

file ./files/*/*

Will render something like:

./files/02/020958777556801f5f5f7649f8e20f326c562829: JPEG image data, JFIF standard 1.01
./files/02/025864fdbd016e966ac6f091e4969e2a43d5f46a: JPEG image data, JFIF standard 1.01
./files/07/071ec456214ae7ec778919abc5cf8251a1954b11: JPEG image data, JFIF standard 1.02
./files/0d/0dbc72e5e6bcdb127994c65cf4e4d6c87fe95352: JPEG image data, JFIF standard 1.01
./files/0e/0ee6fb014df0bc7b4b2aa80beb47a8a87df6ca72: JPEG image data, JFIF standard 1.01
./files/0f/0f7637e3d6298d70afe8ff48250a49fd13f0d12a: Macromedia Flash Video

Using your  Finder (not command line), one can then navigate to the files of interest ... ie, to see the last one listed, open files then open 0f and then double click on 0f7637e3d6298d70afe8ff48250a49fd13f0d12a should launch whatever you have on the Mac that plays Flash Videos.

At this point, one could copy the 0f7637e3d6298d70afe8ff48250a49fd13f0d12a file and then rename it to something human: myflashvideo.flv

Also, depending upon how much wants to recover what, one could inspect the .xml files found and acquire at least the text of the item.

Example: folder (which may or may not exist in your extraction) called 'activities' has subfolders some named 'page_###'.  Changing into extracted/activities/page_275 and listing will show xml files.

One will be page.xml

Opening that with TextEdit one will see a section such as:

    <name>How To Build A Tower (Part Two)</name>
    <intro>&lt;p&gt;For setting up storage folder and cutting wood&lt;/p&gt;</intro>
    <introformat>1</introformat>
    <content>&lt;p&gt;&lt;span style="font-size: large;"&gt;In order to create a tower, the following steps MUST be followed &lt;strong&gt;in order&lt;/strong&gt;. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: large;"&gt;Step 1: Get a manila folder from the teacher&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: large;"&gt;Step 2: Write &lt;span style="color: #ff0000;"&gt;your own name&lt;/span&gt; &lt;span style="color: #ff0000;"&gt; and period&lt;/span&gt; like the pictures below &lt;span style="font-size: large;"&gt;(not George Smith and not 6.1.A)&lt;/span&gt;. Use a Sharpie in dark black ink and PRINT in &lt;span style="color: #ff0000;"&gt;neat block letters&lt;/span&gt;. Start in the top left corner of the tab with your name. Put the period just below your first name.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: large;"&gt;You will not get a second chance, so make sure you do it right the first time. If you make a mistake, you will have to provide your own manila folder.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://moodle.org/pluginfile.php/127/mod_forum/post/985482/tower%20folder%20start%20writing.jpg" height="260" width="347" /&gt;&lt;img src="https://moodle.org/pluginfile.php/127/mod_forum/post/985482/tower%20george%20smith%20writing.jpg" height="259" width="389" /&gt;&lt;/p&gt;</content>

One could do a few (ok, a lot) of search and replaces to remove the xml tags and other stuff one doesn't need.   The save the file as something.txt for later copy and paste into the page resource one is rebuilding in a Moodle course.

Granted, it's a lot of work, but we do what we must IF we must! :|

'spirit of sharing', Ken


Viewing all articles
Browse latest Browse all 6586

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>