Skip to content

Commit

Permalink
Merge pull request #369 from joshdentremont/patch-9
Browse files Browse the repository at this point in the history
added new make commands for importing and exporting in fedora 6
  • Loading branch information
aOelschlager committed Apr 10, 2024
2 parents d451f32 + 787e2b9 commit 9e49316
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,28 @@ endif

# Dump fcrepo as zipped tarball
fcrepo-export:
ifndef DEST
$(error DEST is not set)
endif
docker compose exec -T fcrepo with-contenv bash -lc 'tar zcvf fcrepo-export.tgz -C /data/home/data/ocfl-root/ .'
docker compose exec -T fcrepo with-contenv bash -lc 'mv fcrepo-export.tgz /tmp'
docker cp $$(docker compose ps -q fcrepo):/tmp/fcrepo-export.tgz $(DEST)


# Import fcrepo from zipped tarball
fcrepo-import: $(SRC)
ifndef SRC
$(error SRC is not set)
endif
docker cp "$(SRC)" $$(docker compose ps -q fcrepo):/tmp/fcrepo-export.tgz
docker compose exec -T fcrepo with-contenv bash -lc 'rm -r /data/home/data/ocfl-root/*'
docker compose exec -T fcrepo with-contenv bash -lc 'tar zxvf /tmp/fcrepo-export.tgz -C /data/home/data/ocfl-root/ && chown -R tomcat:tomcat /data/home/data/ocfl-root/ && rm /tmp/fcrepo-export.tgz'
docker compose exec -T mariadb with-contenv bash -lc 'mysql -e "drop database fcrepo;"'
docker compose restart fcrepo


# Dump fcrepo as zipped tarball
fcrepo5-export:
ifndef DEST
$(error DEST is not set)
endif
Expand All @@ -426,7 +448,7 @@ endif


# Import fcrepo from zipped tarball
fcrepo-import: $(SRC)
fcrepo5-import: $(SRC)
ifndef SRC
$(error SRC is not set)
endif
Expand Down

0 comments on commit 9e49316

Please sign in to comment.