Package org.exist.backup

Examples of org.exist.backup.Backup


        registerDatabase();
        log( "Creating backup of collection: " + uri );
        log( "Backup directory: " + dir );

        try {
            final Backup backup = new Backup( user, password, dir, XmldbURI.create( uri ) );
            backup.backup( false, null );

        }
        catch( final Exception e ) {
            e.printStackTrace();
            final String msg = "Exception during backup: " + e.getMessage();
View Full Code Here


                   
            }
       
           
            try {
                final Backup backup = new Backup(
                    properties.getProperty(InteractiveClient.USER, SecurityManager.DBA_USER),
                    properties.getProperty(InteractiveClient.PASSWORD, null), backuptarget,
                    XmldbURI.xmldbUriFor(properties.getProperty(InteractiveClient.URI, "xmldb:exist://")
                    + collection)
                );
                backup.backup(true, this);
            } catch (final XMLDBException e) {
                showErrorMessage("XMLDBException: " + e.getMessage(), e); //$NON-NLS-1$
            } catch (final IOException e) {
                showErrorMessage("IOException: " + e.getMessage(), e); //$NON-NLS-1$
            } catch (final SAXException e) {
View Full Code Here

     */
    @Override
    public boolean backup(String userbackup, String password,
  String destcollection, String collection) throws EXistException, PermissionDeniedException {
      try {
           final Backup backup = new Backup(
            userbackup,
                    password,
                    destcollection+"-backup",
                    XmldbURI.xmldbUriFor(XmldbURI.EMBEDDED_SERVER_URI.toString() + collection));
                backup.backup(false, null);

            } catch (final Throwable e) {
                handleException(e);
      }
        return true;
View Full Code Here

    public void execute(DBBroker broker) throws EXistException {
        final String dateTime = DataBackup.creationDateFormat.format(Calendar.getInstance().getTime());
        final String dest = directory.getAbsolutePath() + File.separatorChar + prefix + dateTime + suffix;

        final Backup backup = new Backup(user, password, dest, collection);
        try {
            backup.backup(false, null);
        } catch (final XMLDBException e) {
            LOG.debug(e.getMessage(), e);
            throw new EXistException(e.getMessage(), e);
        } catch (final IOException e) {
            LOG.debug(e.getMessage(), e);
View Full Code Here

TOP

Related Classes of org.exist.backup.Backup

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.