You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Alexander Shraer (JIRA)" <ji...@apache.org> on 2014/08/01 08:10:38 UTC
[jira] [Updated] (ZOOKEEPER-1994) Backup config files.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1994?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Shraer updated ZOOKEEPER-1994:
----------------------------------------
Description:
We should create a backup file for a static or dynamic configuration file before changing the file.
Since the static file is changed at most twice (once when removing the ensemble definitions, at which point a dynamic file doesn't exist yet, and once when removing clientPort information) its probably fine to back up the static file independently from the dynamic file.
To track backup history:
Option 1: we could have a .bakXX extention for backup where XX is a sequence number.
Option 2: have the configuration version be part of the file name for dynamic configuration files (instead of in the file like now). Such as zoo_replicated1.cfg.dynamic.1000000 then on reconfiguration simply create a new dynamic file (with new version) and update the link in the static file to point to the new dynamic one.
Summary: Backup config files. (was: Backup config files before changing.)
Updated the description and listed two possible approaches.
I like the 2nd one since it also addresses the version issue (currently we have the version number written plainly in a config file but the user mustn't modify it).
What do others think ? [~phunt][~fpj][~hdeng][~michim][~marshall]
> Backup config files.
> --------------------
>
> Key: ZOOKEEPER-1994
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1994
> Project: ZooKeeper
> Issue Type: Improvement
> Affects Versions: 3.5.0
> Reporter: Hongchao Deng
> Assignee: Hongchao Deng
> Fix For: 3.5.0
>
>
> We should create a backup file for a static or dynamic configuration file before changing the file.
> Since the static file is changed at most twice (once when removing the ensemble definitions, at which point a dynamic file doesn't exist yet, and once when removing clientPort information) its probably fine to back up the static file independently from the dynamic file.
> To track backup history:
> Option 1: we could have a .bakXX extention for backup where XX is a sequence number.
> Option 2: have the configuration version be part of the file name for dynamic configuration files (instead of in the file like now). Such as zoo_replicated1.cfg.dynamic.1000000 then on reconfiguration simply create a new dynamic file (with new version) and update the link in the static file to point to the new dynamic one.
--
This message was sent by Atlassian JIRA
(v6.2#6252)