Skip to content

Instantly share code, notes, and snippets.

@rah003
Created April 15, 2020 11:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rah003/e7e8d8e31e2a218d529f50d9b5f9dd97 to your computer and use it in GitHub Desktop.
Save rah003/e7e8d8e31e2a218d529f50d9b5f9dd97 to your computer and use it in GitHub Desktop.
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