Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. First, copy all the AIPs to a shareable location.  Below, we chose /usr/share/dspace/AIP-restore folder:

    Code Block
    # Create share location
    sudo mkdir -p /usr/share/dspace/AIP-restore
    
    # Manually copy all existing AIPs over there (TODO: This should be automated or synced in future)
    cd /usr/share/dspace/AIP-restore/
    sudo cp ~dspace/AIP-restore/* .
    sudo chown -R dspace:dspace /usr/share/dspace/AIP-restore/
    
    
    # Add DSpace to www-data user group (to give Apache read access)
    sudo usermod -a -G www-data dspace
    
    
    # Give Apache group rights on directory
    sudo chgrp www-data /usr/share/dspace/AIP-restore/
    sudo chmod g+rxs /usr/share/dspace/AIP-restore/


  2. Next, update the Apache configuration for demo.dspace.org to provide access to that shareable location:

    Code Block
    sudo nano /etc/apache2/sites-available/25-demo.dspace.org.conf
    
    ## ADD THE FOLLOWING INTO THAT FILE (inside the <VirtualHost>)
    <VirtualHost *:80>
      ...
      # Define path /aip to point at shareable AIP-restore location
      Alias "/aip" "/usr/share/dspace/AIP-restore"
      <Directory "/usr/share/dspace/AIP-restore">
        # Allow viewing file listing
        Options Indexes
        # Don't allow access to README, logs or parent link (..)
        IndexIgnore README* *.log ..
        # Allow access to all
        Order allow,deny
        Allow from all
      </Directory>
      # Don't proxy /aip paths to Tomcat
      ProxyPass /aip !
      ...
    </VirtualHost>
    


  3. Reload Apache and test it out:

    Code Block
    sudo service apache2 reload


  4. Assuming everything works, here's a wget command that can be used to download the AIPs to a local computer 

    Code Block
    # This recursively downloads all files (except index.html file) into an "aip" directory
    wget -r -np -nH -R "index.html*" --execute="robots=off" http://demo.dspace.org/aip/


...