migration.rst 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. Migration, Backup & Restore
  2. ===========================
  3. All LAKEsuperior data is by default fully contained in a folder. This
  4. means that only the data, configurations and code folders are needed for
  5. it to run. No Postgres, Redis, or such. Data and configuration folders
  6. can be moved around as needed.
  7. Migration Tool
  8. --------------
  9. Migration is the process of importing and converting data from a
  10. different Fedora or LDP implementation into a new LAKEsuperior instance.
  11. This process uses the HTTP/LDP API of the original repository. A
  12. command-line utility is available as part of the ``lsup-admin`` suite to
  13. assist in such operation.
  14. A repository can be migrated with a one-line command such as:
  15. ::
  16. ./lsup-admin migrate http://source-repo.edu/rest /local/dest/folder
  17. For more options, enter
  18. ::
  19. ./lsup-admin migrate --help
  20. The script will crawl through the resources and crawl through outbound
  21. links within them. In order to do this, resources are added as raw
  22. triples ( i.e. no consistency checks are made).
  23. **Note:** the consistency check tool has not yet been implemented at the
  24. moment but its release should follow shortly. This will ensure that all
  25. the links between resources are consistent in regard to referential
  26. integrity.
  27. This script will create a full dataset in the specified destination
  28. folder, complete with a default configuration that allows to start the
  29. LAKEsuperior server immediately after the migration is complete.
  30. Two approaches to migration are possible:
  31. 1. By providing a starting point on the source repository. E.g. if the
  32. repository you want to migrate is at ``http://repo.edu/rest/prod``
  33. you can add the ``-s /prod`` option to the script to avoid migrating
  34. irrelevant branches. Note that the script will still reach outside of
  35. the starting point if resources are referencing other resources
  36. outside of it.
  37. 2. By providing a file containing a list of resources to migrate. This
  38. is useful if a source repository cannot produce a full list (e.g. the
  39. root node has more children than the server can handle) but a list of
  40. individual resources is available via an external index (Solr,
  41. triplestore, etc.). The resources can be indicated by their fully
  42. qualified URIs or paths relative to the repository root. (*TODO
  43. latter option needs testing*)
  44. Backup And Restore
  45. ------------------
  46. A back up of a LAKEshore repository consists in copying the RDF and
  47. non-RDF data folders. These folders are indicated in the application
  48. configuration. The default commands provided by your OS (``cp``,
  49. ``rsync``, ``tar`` etc. for Unix) are all is needed.