[java-identity-provider] branch master updated: IDP-1525 Don't even attempt to backup during an install
Rod Widdowson
rdw at steadingsoftware.com
Thu Jan 16 06:13:30 EST 2020
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch master
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=69604d8db881abd1fcd22f6f7b2c80484d48c956
The following commit(s) were added to refs/heads/master by this push:
new 69604d8 IDP-1525 Don't even attempt to backup during an install
69604d8 is described below
commit 69604d8db881abd1fcd22f6f7b2c80484d48c956
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Thu Jan 16 11:12:19 2020 +0000
IDP-1525 Don't even attempt to backup during an install
https://issues.shibboleth.net/jira/browse/IDP-1525
We fix this in the documentation
---
.../shibboleth/idp/installer/CopyDistribution.java | 31 ----------------------
1 file changed, 31 deletions(-)
diff --git a/idp-installer/src/main/java/net/shibboleth/idp/installer/CopyDistribution.java b/idp-installer/src/main/java/net/shibboleth/idp/installer/CopyDistribution.java
index 8174630..2530735 100644
--- a/idp-installer/src/main/java/net/shibboleth/idp/installer/CopyDistribution.java
+++ b/idp-installer/src/main/java/net/shibboleth/idp/installer/CopyDistribution.java
@@ -19,9 +19,6 @@ package net.shibboleth.idp.installer;
import java.nio.file.Files;
import java.nio.file.Path;
-import java.text.SimpleDateFormat;
-import java.time.Instant;
-import java.util.Date;
import javax.annotation.Nonnull;
@@ -67,39 +64,11 @@ public final class CopyDistribution extends AbstractInitializableComponent {
*/
public void execute() throws BuildException {
ComponentSupport.ifNotInitializedThrowUninitializedComponentException(this);
- backupOld();
deleteOld();
copyDist();
copyBinDocSystem();
}
- /** Copy bin, edit-webapp, dist and doc to old-date-time.
- * @throws BuildException if badness occurs
- */
- protected void backupOld() throws BuildException {
- if (installState.getInstalledVersion() == null) {
- return;
- }
- final SimpleDateFormat fmt = new SimpleDateFormat("'old-'yyyy-MM-dd-HH-mm-ss");
- final Path backup = installerProps.getTargetDir().resolve(fmt.format(Date.from(Instant.now())));
- InstallerSupport.createDirectory(backup);
- backup(installerProps.getTargetDir().resolve("edit-webapp"), backup.resolve("edit-webapp"));
- backup(installerProps.getTargetDir().resolve("doc"), backup.resolve("doc"));
- backup(installerProps.getTargetDir().resolve("system"), backup.resolve("system"));
- }
-
- /** Helper for the {@link #backupOld()} method.
- * @param from where from
- * @param to where to.
- * @throws BuildException if badness occurs
- */
- private void backup(final Path from, final Path to) throws BuildException {
- log.debug("Backing up from {} to {}", from, to);
- final Copy copy = InstallerSupport.getCopyTask(from, to);
- copy.setFailOnError(false);
- copy.execute();
- }
-
/** Helper for the {@link #deleteOld()} method.
* @param what what to delete
*/
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list