Forum OpenACS Q&A: Volunteer for putting back /storage

The /storage section of openacs.org was erased. Seems that Dave has a backup, but we need a volunteer to figure out how to restore it! anyone?
Collapse
Posted by Dave Bauer on
Here is what we have

1) not too old copy of the openacs.org database
2) not too old copy of content-repository-content-files directory

So, mainly we need a script that can extract the data from the database for the file storage files, acs_objects, cr_items, and cr_revisions rows and write a sql script we can apply to the live site.

Then we can do something like 1) backup content-repository-content-files on live site, 2) copy over old content-repository-content-files, 3) done, we have the backup in case someting went wrong.

Collapse
Posted by Torben Brosten on
If Ola is still around and her bulk-upload work is complete[1], maybe we can:

a. make a local instance of the backup,
b. bulk download the /storage directory with all contents, and then
c. bulk upload the file into openacs.org?

1. https://openacs.org/bugtracker/openacs/com/dotlrn-fs/bug?bug_number=930

In either case, maybe the script could be generalized so that it is useful for more than just this one case.

Collapse
Posted by Dave Bauer on
Torben,

That's a good idea, the original bulk upload did not unzip into directories, but I updated file-storage to work that way.
I am just not sure where that code exists (5.2 or HEAD)

We should be able to export from the old instance, (and make sure the export uses directories, I think it does) and then upload back into OpenACS. Maybe its possible to export the file and scp it over to the other server, and import frm the filesystem to save download and upload effort.

Collapse
Posted by Torben Brosten on
Bulk uploading from the local file system should work well. It bypasses having to deal with possible connection time-outs with the browser etc.

ecommerce package's Bulk Product Image Loader[1] imports images from the local file system in a similar way. One would just import a file with line item values that meet file-storage/www/file-add specs instead of ecommerce (sku)...

Since it's rare enough and admin access is necessary, just create a file-storage/www/admin/bulk-import-files-from-local page

1. http://cvs.openacs.org/cvs/openacs-4/packages/ecommerce/www/admin/products/import-images.tcl?view=markup

Collapse
Posted by Malte Sussdorff on
I just wrote and committed folder-add.tcl which allows you to add a folder from the filesystem, actually working recursively (at least it should, no time to test yet). This is on 5-2, as OpenACS resides on 5.2. I just used folder-zip-upload.tcl and took out the code of extracting the zip file. Rest worked like a charm.

So, if someone uploads the old content to the filesystem and updates the file storage application, we should be fine.

Collapse
Posted by Malte Sussdorff on
This code has been rolled back, please go and visit the attic (http://cvs.openacs.org/cvs/openacs-4/packages/file-storage/www/Attic/ file: folder-add*)if you are interested in this code or ask someone from the OCT (except me) to revive a copy.