Skip to content

Commit

Permalink
0003512: Make snapshot name configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredfrees committed May 14, 2019
1 parent 95afbf8 commit a2d0854
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Expand Up @@ -406,7 +406,10 @@ public static File createSnapshot(ISymmetricEngine engine) {

File jarFile = null;
try {
jarFile = new File(getSnapshotDirectory(engine), tmpDir.getName() + ".zip");
String filename = tmpDir.getName() + ".zip";
if (parameterService.is(ParameterConstants.SNAPSHOT_FILE_INCLUDE_HOSTNAME))
filename = AppUtils.getHostName() + "_" + filename;
jarFile = new File(getSnapshotDirectory(engine), filename);
ZipBuilder builder = new ZipBuilder(tmpDir, jarFile, new File[] { tmpDir });
builder.build();
FileUtils.deleteDirectory(tmpDir);
Expand Down
Expand Up @@ -487,6 +487,8 @@ private ParameterConstants() {
public final static String CLOUD_BULK_LOAD_AZURE_BLOB_CONTAINER = "cloud.bulk.load.azure.blob.container";
public final static String CLOUD_BULK_LOAD_AZURE_SAS_TOKEN = "cloud.bulk.load.azure.sas.token";

public final static String SNAPSHOT_FILE_INCLUDE_HOSTNAME = "snapshot.file.include.hostname";

public static Map<String, ParameterMetaData> getParameterMetaData() {
return parameterMetaData;
}
Expand Down
Expand Up @@ -2522,3 +2522,10 @@ cloud.bulk.load.azure.blob.container=symmetricds
# DatabaseOverridable: true
# Tags: cloud, snowflake, azure
cloud.bulk.load.azure.sas.token=

# Prefix snapshot filename with hostname to indicate which environment it came from
#
# DatabaseOverridable: true
# Tags: other
# Type: boolean
snapshot.file.include.hostname=false

0 comments on commit a2d0854

Please sign in to comment.