Created
April 15, 2020 11:38
-
-
Save rah003/e7e8d8e31e2a218d529f50d9b5f9dd97 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.xml.* | |
import info.magnolia.importexport.DataTransporter; | |
println "begin" | |
repo = "dam" | |
session = ctx.getJCRSession(repo) | |
path = "/" | |
f = new File("/tmp/dam.xml"); | |
fileOut = new FileOutputStream(f); | |
println "exporting" | |
DataTransporter.executeExport(fileOut, false, true, session, path, repo, ".xml"); | |
println "exported" | |
fileOut.close(); | |
println "exported? " + f.exists() | |
println "size:" + f.length() / 1024d + " kb" | |
println "done" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment