Presentation is loading. Please wait.

Presentation is loading. Please wait.

Mukesh A Pund Scientist NISCAIR

Similar presentations


Presentation on theme: "Mukesh A Pund Scientist NISCAIR"— Presentation transcript:

1 Mukesh A Pund Scientist NISCAIR
DSpace Import, Export & Backup Mukesh A Pund Scientist NISCAIR

2 Backup Vs. Export/Import
Backup is meant for guarding the data from disk crash, virus attack, hacking or any calamity Export/Import is meant for exchange of digital objects across repositories

3 Hardware Required for Backup
Any one of the following CD-ROM/DVD-ROM DAT Drive External Hard disk Another system on the LAN

4 DSpace Directory Structure
/dspace/assetstore /dspace/assetstore (bitstreams – most important) /dspace/bin (commands to be used at command line, can always be generated from dspace-source files /dspace/config (you might have customized it, one time backup is good enough) /dspace/handle-server

5 DSpace Directory Structure
/dspace/lib (can always be generated from dspace- source) /dspace/logs (essential to generate statistical reports and bug tracing) /dspace/reports (can be generated from Log files) /dspace/search (can be regenerated using index-all command)

6 Where DSpace stores data
/dspace/assetstore directory will have all the Bitstreams and licenses PostgreSQL databases contains information on Communities Collections e-groups E-persons, thier passwords Host of other information

7 What should be Backedup
Your DSpace postgreSQL database /dspace/assetstore (minimum backup) /dspace (entire directory)

8 Creating Backup Directory
Create one directory where backup files will be stored Eg #mkdir /dspacebkp #chmod 777 /dspacebkp

9 tar Command (compress)
To back up /dspace directory $tar zcvf /dspacebkp/dspace tar.gz /dspace To back up only /dspace/assetstore $tar zcvf /dspace/asset tar.gz /dspace/assetstore

10 Untar (uncompress) To untar and unzip the tar.gz file, you may use the following command $tar zxvf /dspacebkp/dspace tar.gz WARNING:The safer approach is to use the above command in temp directory and copy it to dspace directory only after successfully untaring the file

11 Backup of database The following commands are for Postgresql database backup Run pg_dump as dspace user Ex: $ su - /dspace /usr/local/pgsql/bin/pg_dump dspace > /dspacebkp/dspace_db_150508

12 Backup of database Where dspace is name of the database
/dspacebkp/dspace_db_ file is backup file in which all the table definitions and contents will be stored

13 Restoring the backup data
One can use any of the following commands: psql command OR pg_restore

14 Restoring the Database
WARNING: You do not need to restore, unless your data got corrupted. Not to be used as a routine Of course backup should be done periodically

15 Using psql to Restore $ psql -d dspace -f /dspacebkp/dspace_db_150508
Where dspace is the name of database dspace_db_ is the backup file taken on 15th May 2008.

16 Using pg_restore to Restore
pg_restore -d dspace /dspacebkp/dspace_db_150508 More options of pg_restore can be explored by $ man pg_restore

17 Export/Import in Dspace
Not to be used as a backup mechanism Export and import deal only with bitstreams, metadata, license and handles You can export or Import An item or A collection

18 Export

19 Importing

20 What is exported The following files will be created for every item
dublin_core.xml ( metadata) Handle ( one line having the handle number) license.txt Actual file ( bitstream: could be pdf or doc or an image file) Contents (with two lines – license file name, and actual bitstream name)


Download ppt "Mukesh A Pund Scientist NISCAIR"

Similar presentations


Ads by Google