Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
-
8dec4869
by tchemit at 2020-04-18T08:18:11+02:00
2 changed files:
- client-configuration/src/main/java/fr/ird/observe/client/configuration/ClientConfig.java
- client-core/src/main/java/fr/ird/observe/client/backup/BackupsManager.java
Changes:
| ... | ... | @@ -82,7 +82,7 @@ public class ClientConfig extends GeneratedClientConfig implements NavigationTre |
| 82 | 82 |
ClientConfigOption.MAP_LAYER9,
|
| 83 | 83 |
ClientConfigOption.MAP_LAYER10);
|
| 84 | 84 |
/** le pattern du fichier de sauvegarde d'une base locale */
|
| 85 |
- private static final String BACKUP_DB_PATTERN = "obstuna-local-%1$tF--%1$tk-%1$tM-%1$tS.sql.gz";
|
|
| 85 |
+ private static final String BACKUP_DB_PATTERN = "observe-v%1$s-%2$tF--%2$tk-%2$tM-%2$tS.sql.gz";
|
|
| 86 | 86 |
private static final String APPLICATION_VERSION = "application.version";
|
| 87 | 87 |
private static final String VERSION = "version";
|
| 88 | 88 |
private static final String PROPERTY_LOCAL_STORAGE_EXIST = "localStorageExist";
|
| ... | ... | @@ -368,13 +368,11 @@ public class ClientConfig extends GeneratedClientConfig implements NavigationTre |
| 368 | 368 |
}
|
| 369 | 369 |
|
| 370 | 370 |
public File newBackupDataFile() {
|
| 371 |
- return new File(getBackupDirectory(), String.format(BACKUP_DB_PATTERN, new Date()));
|
|
| 371 |
+ return new File(getBackupDirectory(), String.format(BACKUP_DB_PATTERN, getBuildVersion(), new Date()));
|
|
| 372 | 372 |
}
|
| 373 | 373 |
|
| 374 | 374 |
public void saveForUser() {
|
| 375 |
- if (log.isInfoEnabled()) {
|
|
| 376 |
- log.info(t("observe.message.save.configuration", get().getUserConfigFile()));
|
|
| 377 |
- }
|
|
| 375 |
+ log.info(t("observe.message.save.configuration", get().getUserConfigFile()));
|
|
| 378 | 376 |
get().saveForUser(unsavables);
|
| 379 | 377 |
}
|
| 380 | 378 |
|
| ... | ... | @@ -66,7 +66,7 @@ public class BackupsManager implements Closeable { |
| 66 | 66 |
|
| 67 | 67 |
private static final Logger log = LogManager.getLogger(BackupsManager.class);
|
| 68 | 68 |
|
| 69 |
- private static final Pattern AUTOMATIC_BACKUP_FILENAME_PATTERN = Pattern.compile("obstuna-local-([0-9-]+)\\.sql\\.gz");
|
|
| 69 |
+ private static final Pattern AUTOMATIC_BACKUP_FILENAME_PATTERN = Pattern.compile("obs.+-([0-9-]+)\\.sql\\.gz");
|
|
| 70 | 70 |
|
| 71 | 71 |
private final Path backupsPath;
|
| 72 | 72 |
private final Path storePath;
|