Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added new make commands for importing and exporting in fedora 6 #369

Merged
merged 3 commits into from
Apr 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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