Package org.platformlayer.ops.backups

Examples of org.platformlayer.ops.backups.BackupContext.uploadStream()


    {
      Command dumpAll = Command.build("su postgres -c \"pg_dumpall --globals-only\"");
      Backup request = new Backup();
      request.target = target;
      request.objectName = baseName + "/pgdump_meta";
      backupContext.uploadStream(request, dumpAll);
    }

    for (String database : databases) {
      // template0 cannot be backed up
      if (database.equals("template0")) {
View Full Code Here


      Backup request = new Backup();
      request.target = target;
      request.objectName = baseName + "/" + fileName;

      Command dumpDatabase = Command.build("su postgres -c \"pg_dump --oids -Fc --verbose {0}\"", database);
      backupContext.uploadStream(request, dumpDatabase);
    }
  }

  private List<String> listDatabases(OpsTarget target) throws OpsException {
    Command listDatabases = Command.build("su postgres -c \"psql -A -t -c 'select datname from pg_database'\"");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.