Skip to content

Instantly share code, notes, and snippets.

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/94ae552c587a98afc91fc0f1d2074bc4 to your computer and use it in GitHub Desktop.
Save rah003/94ae552c587a98afc91fc0f1d2074bc4 to your computer and use it in GitHub Desktop.
import groovy.xml.*
import info.magnolia.importexport.DataTransporter;
repo = "dam"
path = "/"
outPath = "/tmp/dam.xml"
f = new File(outPath);
fileOut = new FileOutputStream(f);
DataTransporter.executeExport(fileOut, false, true, ctx.getJCRSession(repo), path, repo, ".xml");
fileOut.close();
println "exported? " + f.exists()
println "size:" + f.length() / 1024d + " kb"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment