edrc

Package: WA2L/edrc 1.5.57
Section: Maintenance Commands (1m)
Updated: 21 January 2021
Index Return to Main Contents

 

NAME

edrc - EDRC, Enterprise Disaster Recovery Console

 

SYNOPSIS

edrc/sbin/edrc [ -h | -V ]

edrc [ -c cfg ] [ -n session_name ] [ -s ] [ -t ]

 

AVAILABILITY

WA2L/edrc

 

DESCRIPTION

The edrc program is the core part of the WA2L/edrc environment. The EDRC provides an easy to use, easy to customize and easy to enhance framework to recover your environment after a "Disaster Case".

The EDRC simplify the development of recovery scripts and helps to recover your environment in an efficient and reliable way.

The WA2L/edrc package has to be an integral part of a whole disaster recovery plan and process. This process is documented step by step in an "Emergency Handbook".

edrc is an interactive (character oriented) tool that supports the administrator and gives the freedom to change settings and invoked scripts at any point.

 

OPTIONS

-h
usage message.

-V
print version and patch level of edrc. For an explanation of the release numbering system see edrcrevision(1).

-c configfile
specify a special configuration file. If you do not use this option the default configuration file edrc/etc/edrc.cfg is used.

-n session_name
specify the session name on the command line. If you use this option you cannot set and alter the session name with the name EDRC command during runtime. Therefore the session name is read only if you use the -n option.

This can be used to ensure that only one edrc instance of a certain configuration is started per host (e.g.: -n JOBCTL ).

If a session has to be marked, but it is allowed to start multiple instances of the same configuration, the @ID@ field should be used in the -n option to generate a dynamic read only session name. The @ID@ field is replaced by the process id of the started edrc instance, but if there is already an instance running with the same name it is replaced by a random number (e.g.: -n JOB_@ID@ ).

When session names are passed thru trunks to remote systems the remote session name is set equal to the local session name if possible.

If there is already a session with the same name running and the @ID@ field is used as part of the session name, the @ID@ field content will be resolved new and the trunk can be established. If the @ID@ field is not used the trunk will not be established due to the fact that only one session with the identical name is allowed to be set/started per host.

Hint: when starting sat(1) the option -n SAT_@ID@ is passed internally to edrc.

-s
silent startup. startup without showing the EDRC banner.

-t
no terminal initialization. Sometimes the terminal initialization causes unwanted behavior. To skip terminal initialization, invoke edrc with this option.

 

COMMANDS

This section describes all interactive internal commands of edrc;

!<number>
execute the command with the number <number> listed in the edrc history. To list the history use the history command.

!!
execute the command you invoked the last. This command is evaluated from the edrc history. To list the history use the history command.

@
execute the menupoint you invoked the last. This command re-invokes the menupoint which is displayed after the ":" in the EDRC prompt.

b, back, up
go one menu back. Respectively exit a submenu and go back to the overlying menu.

banner
display the program startup banner with the copyright and version information.

busy
print a rotating slash. This command does nothing productive. It might be useful to keep a line open when for instance a firewall cuts the connection if a TCP timeout is reached. To end the rotating press Ctrl+C.

clear
clear screen.

date
print the current system date and time.

debug
toggle the script debug variable $DEBUG between False and True. All recovery shellscripts should have the following line included to be able to react to the debug command:

test "$DEBUG" = True && set -x 

After startup the $DEBUG variable is set to False.

distribute
distribute recovery scripts to other hosts. This command allows you to keep all recovery scripts on all your hosts synchronized. It is recommended that you set up your recovery menu tree that way that you can have an identical set of scripts on all your hosts. This has the advantage of a "single point of administration".
See edrc.cfg(4) for information about the configuration and the configuration file names.

The distribute command will guide you to a couple of steps needed to transfer the scripts to a set of hosts. It is also possible to enter hostgroups ( @HOSTGROUP ), as known from the hostlist command.

You will have the opportunity to cancel at several points.

Distribution types:

To speed up distribution and to allow some parallel editing on different hosts you can choose between a differential and a full distribution. A full distribution contains all files in a recovery script tree, a differential distribution contains only the files that are newer then the last full distribution.

The following guideline helps to decide which distribution type to use in what situation: If things are removed or renamed, use a full distribution, in all other cases use a differential distribution.

The following steps are performed by the distribute command:
1.)
create a new distribution file. This file contains scripts in SCRIPTS_BASEDIR. If you decide to create a full distribution, all files will be packed. If you decide to create a differential distribution, only the files will be packed which are newer then the last distribution file created by a full distribution.
2.)
specify a list of hosts to distribute the distribution file to.
3.)
distribute (copy) the distribution file to each target host in the list.
4.)
on the target host backup the current scripts. If it is a full distribution all scripts are backed up. If it is a differential distribution only the files which will be overwritten are backed up.
5.)
if it is a full distribution remove all scripts in SCRIPTS_BASEDIR on the target host.
6.)
extract the distribution file to the SCRIPTS_BASEDIR on the target host.

Hint:

The host where you invoke the distribute command is excluded from distribution. Therefore you can keep the local host in the DIST_HOSTLIST and the configuration file edrc.cfg can be kept identical on all your hosts.

To view the contents of a compressed backup file (without decompressing it) you can use the lscomp, llcomp and catcomp commands in the shell.

edrcdebug
this will toggle debugging on the edrc command between False and True. Normally only the author of edrc will use this command for debugging of the EDRC itself. To debug your recovery scripts use the debug command.

edrcperm
list the complete permission set and all functionality that is defined to be denied. The denial of the startup of certain functions can be specified in the edrc.cfg file with the DENY_LIST setting.

For a disaster recovery configuration, you should *never* deny any functionality from startup, due to the fact that in a disaster recovery maximal flexibility has to be provided under all circumstances.

Therefore the feature to deny certain functions from execution should only be used for system administration configurations, and even there - use it moderately! The user gets the message: "edrc-WARNING: execution of functionality '<option>' not permitted." if a certain command/functionality is not permitted to be executed. See also edrc.cfg(4) for more information.

env
create, edit, view, remove the environment file. The environment file ( _env ) is used to do common settings for a certain menu (=directory).

So you can set passwords, ORACLE_SID's etc. in this file and you don't have to edit all your recovery scripts in this menu if you change the password (for instance). You could also do some user prompting in this environment file if you have to.

To keep the process and the dependencies simple the environment settings are not inherited to sub-menus.

If you like to share a whole recovery script tree later with other system administrators you can strip out all passwords from _env files with the envpasswdstrip shell command. This command triggers for patterns like 'export*password=my_secret' and 'export*passwd=my_secret' and substitutes the password with the string 'PASSWORD_STRIPED_OUT'.

How a recovery script is started:
1.)
If an environment file ( _env ) exists for the current menu (=directory), the _env file is sourced and the variables defined in it are set. Your code has to be ksh conform and the variables have to be exported.
2.)
If the recovery script is executable, invoke it directly. It is also validated, if the command defined in the recovery scripts magic key exists. If the shell in the magic key does not exist a fallback mechanism tries to resolve an alternate shell to be used to start the recovery script.
3.)
If the recovery script is not executable, start it in using the shell as defined in the magic key. Here the fallback mechanism as described above applies as well.

Hint:

To be sure that your settings will reach the recovery script you should always export your variables.

When you create a new environment file a template is provided.

The environment file has the filepermissions 600.

Example _env file:

#
# _env - Environment settings for commands in ....
#
# [00] 29.01.2003 CWa  Initial Version
#
#
test "$DEBUG" = True && set -x
export system_password=coo1runnings
export sys_password=he11oworld 
export scott_passwd=tiger
export app_user=psoft
export oracle_sid=FS75PROD
export oracle_owner=oracle

erase
set the erase terminal character. Normally the system can determine the erase character by itself. However, in some circumstances it is still wrong. The erase command allows you to choose an erase character from a list or to specify the correct character by yourself.

header
create, edit, view, remove a menu header. The menu header is intended to display additional information below the menu title, if the menu title information is not sufficient.

help, h, usage, ?
print a short help of all internal and contributed (contrib.edrc(1m)) commands.

history, hist
print the history of edrc. The history contains all invoked commands. Commands which are entered repetitive are listed only once.

hostname
print the hostname of the system you started edrc on.

loadrec
load a previous saved recovery point in time from disk. This will set the $EDRC_RECOVERYTIME environment variable which is exported to all recovery scripts. To display a recovery point in time, use the printrec command, to set a recovery point in time, use the setrec command.

log
view the last logfile. Every output of a recovery script is saved to a logfile. Therefore your recovery scripts don't have to care about logging information.

man
display manual pages.

menu, m, ls
print the menu. In the menu title the name of the current session (if set with the name command) is displayed. All menupoints are enclosed by square brackets: [ 28 ]. Submenus are marked with a " > " sign. The current location in the script tree is part of the edrc prompt. The prompt consists of three parts which might not be present at all times:

edrc@host/Oracle/PSYS:157>

In this example you are in the sub-sub menu "PSYS" and the last menupoint you selected was "157". If you execute a edrc command after you selected a menupoint this will not influence the prompt. So it is very easy to see what your last action during the recovery was.

It will make sense that the menupoints correspond to the reference numbers in the "Emergency Handbook" of your environment.

name
give the current session a name. This is useful to avoid confusion and to find the right session if you started parallel multiple sessions.

The logfiles contain the session name in square brackets: [example ].

If you do not set a session name the current process id or a random value is used as an (ad hoc) session name.

The current session name is printed in the menu head (SESSION: ) when the menu is listed using the menu command.

During a "Disaster Case" or "Disaster Case Simulation" it is highly recommended to set the session name as advised by the "Emergency Handbook".

If possible a session name is transferred to a remote host when a trunk is established. However, if on the remote system a session with the same name is already running, a new (ad hoc) session name will be set automatically.

newmenu, newdir
create a new menu in the recovery script menu tree. edrc will guide you thru the naming of the menu. Finally a menu is a directory with the name:

<menu_point>:<name>

menu_point *and* name has to be unique in the current menu.

If the menu title contains a semicolon ( ; ) the menu entry will be broken into two lines at the position of the semicolon when using the menu command.

newscript
create a new recovery script. edrc will guide you thru the naming of the script and will provide a template script which contains some key elements. The name of the script will be:

<menu_point>:<name>

menu_point *and* name has to be unique in the current menu.

If the script header contains a semicolon ( ; ) the menu entry will be broken into two lines at the position of the semicolon when using the menu command.

PID
print the UNIX process id of the edrc session.

printrec
display the currently set recovery point in time. To set a recovery point in time, use the setrec command, to load a saved recovery point in time, use the loadrec command.

quit
quit edrc at any point.

removemenu
remove an existing submenu. Prior to the removal the menu is backuped.

removescript
remove an existing recovery script. Prior to the removal the file is backuped.

renamemenu
rename an existing submenu.

renamescript
rename an existing recovery script. Prior to the rename the file is backuped.

setrec
set recovery point in time. This will set the $EDRC_RECOVERYTIME environment variable which is exported to all recovery scripts.

The date format has to be compliant to the NLS_DATE_FORMAT configured in edrc.cfg.

You can save your recovery point in time to have it available after a newstart of edrc. To save the recovery point in time would be a good idea in most cases. If you have to change the recovery point in time only temporarily for a certain recovery action you probably won't save it.

To display a recovery point in time, use the printrec command, to load a saved recovery point in time, use the loadrec command.

shell
start a shell in edrc. You should use this command to exit to the operating system rather than to do an other telnet or rlogin to the system.

When you use the shell command the current working directory is the location in the menu you are currently in. Furthermore the shell settings are tuned and customized to the WA2L/edrc environment and all $EDRC_ environment variables are exported to the shell.

On UNIX the Korn-Shell (ksh), on Linux the Bourne-Again-Shell (bash) will be started. To see all additional commands and aliases you have available in the shell type usage within the started shell.

See shell(1) for a description of the additional commands available.

term
set the terminal emulation (the $TERM environment variable) for the current session. See also: edrc.cfg(4).

title
edit, view, remove a menu title created while creating a new submenu. Or create a menutitle for a menu which was not labeled so far.

top
browse directly back to the root menu. If it is a trunk, browse to the trunk root.

trunk
create, edit, view, remove, activate, deactivate the trunk definition ( _trunk ) for a menu. A trunk is basically the invocation of a menu on a remote system. Therefore, ahead of defining a trunk, a normal menu has to be created. A trunk definition enhances a menu with the behavior to be started on a remote system transparently without the need to first manually log on to the remote system, start edrc and then change to the desired submenu.

To establish a trunk to a remote system it must be possible to connect with OpenSSH mode ( -m OpenSSH ) to the remote system using the remote_shell command and the recovery scripts have to be distributed. See also remote_shell(3) and edrc.cfg(4) for more information.

When a new trunk is defined using the trunk command, a specification template consisting of the following elements is provided:

target::= [ comment : ] hostname
The target listed in the specifications below can consist of a comment (optional) and a hostname (not optional) where to connect to. The comment, if specified, is displayed at the trunk dialog instead of the hostname. The comment and the hostname has to be separated by a colon ( : ). Furthermore spaces and tabs are not allowed in a comment text and between the comment, the : and the hostname. If spaces in the comment output are needed, they have to be replaced by a % character in the definition.

ACTIVE= True | False
If ACTIVE is set to True the trunk specification is active and a remote menu invocation will be established based on the remaining trunk settings. If it is set to False the trunk specification exists but is not active. In this case the menu behaves as a normal submenu. When the trunk command is invoked, it is possible to toggle this setting using the (a)ctivate and (d)eactivate options prompted when invoking the trunk command.

TYPE= direct | prompt | prompt:nolocal
If TYPE is set to direct the trunk is established immediately without prompting the user. When it is set to prompt or prompt:nolocal a dialog is displayed and the user is prompted for a selection of a target to establish the trunk to. The dialog for a prompt trunk always includes one menu point to stay on the local system and not to establish a trunk to a remote system. A prompt:nolocal trunk does not provide the local selection.

DEFAULT= target
The target definition here takes into effect if the TYPE setting is set to direct and no target is entered in the TAGETS definition. If TYPE is set to prompt the setting made here is printed in the "Default:" section of the user dialog. This setting is interpreted by a shell, therefore it is also possible to do some dynamic stuff here.

TARGETS= target [{ target }]
White space separated list of targets to be listed in the "Targets:" section of the user dialog when TYPE is set to prompt. If TYPE is set to direct and no DEFAULT target is defined, all elements of this list are probed and the first one that is up is used to establish the trunk to. This setting is interpreted by a shell, therefore it is also possible to do some dynamic stuff here.

TARGET_MENUPATH= menupath
This is an optional setting that is only used for advanced exceptional trunk specifications. When specifying the menupath it is possible to choose a different entry menu at the trunk target.

TARGET_CONFIG= configfile
This is an optional setting that is only used for advanced exceptional trunk specifications. When specifying the configfile it is possible to establish a trunk to a target using a target configuration that differs from the local configuration.

1) Example of a simple trunk specification:

#
# _trunk - Trunk specification for menu /HP_11/services
#
# [00] 22.03.2007 CWa  Initial Version
#
#
ACTIVE=True
TYPE=prompt
DEFAULT="host-001"
TARGETS="host-001 host-002 host-003 host-004"

2) Example of a more enhanced trunk specification:

#
# _trunk - Trunk specification for menu /HP_11/services
#
# [00] 22.03.2007 CWa  Initial Version
#
#
ACTIVE=True
TYPE=prompt
DEFAULT="`server_environment`:localhost"
TARGETS="
        MAINTENANCE:host-001
        TEST:host-002
        PREPRODUCTION:host-003
        PRODUCTION:host-004
"

3) Example defining a dynamic target list

The target list consists of all hosts defined to be member of the group @ALL as defined in the HOSTGRPS setting in the edrc/etc/hostlist.cfg file. Therefore, if a host is added to the @ALL group, the trunk target list will be automatically enhanced.

#
# _trunk - Trunk specification for menu /HP_11/services
#
# [00] 22.03.2007 CWa  Initial Version
#
#
ACTIVE=True
TYPE=prompt
DEFAULT=""
TARGETS="`hostlist -g @ALL`"

4) Example of exceptional advanced trunk specification

Suppose ~edrc/bin/sat is started ( ~edrc/sbin/edrc -c edrc.sat.cfg ), you are in the menu /HP_11 and the submenu services is a trunk. This example definition will establish a trunk using the configuration ~edrc/etc/edrc.psup.cfg on the trunk target. The entry menu on the remote system is /user_mgmt instead of /HP_11/services. It is not imperative to use both advanced trunk specification options in an advanced trunk definition.

Hint: The advanced trunk definition options ( TARGET_MENUPATH and TARGET_CONFIG ) should be used *very* moderately and with a good reason, due to the fact that the chance is high that advanced trunks cannot be established later on (error message: edrc-FATAL: menu does not exist, aborting ), because the target menu structure could be changed without realizing that a certain (sub)menu is a trunk target. On normal trunks, where the menu and the configuration is identical and the menu tree is distributed, this cannot happen.

#
# _trunk - Trunk specification for menu /HP_11/services
#
# [00] 22.03.2007 CWa  Initial Version
#
#
ACTIVE=True
TYPE=prompt
DEFAULT="host-001"
TARGETS="host-002 host-003 host-004"
TARGET_MENUPATH="/user_mgmt"
TARGET_CONFIG="edrc.psup.cfg"

trunkbypass
toggle bypassing of active trunks between True and False. When toggle trunk bypassing to True all active trunks are bypassed in the current session and are not followed.

It might be helpful to bypass trunks to efficiently edit many menu points in submenus which are defined as trunks. Doing so you do not have to first deactivate and after editing activate the trunk for each menu separately.

tty
print the TTY you are logged on and the edrc program is started in.

tz
set the time zone (the $TZ environment variable) for the current session. See also: edrc.cfg(4) and timezone(3).

 

ENVIRONMENT

The following environment variables are exported to all recovery scripts, contributed commands and the shell. Do not use other variables seen by your scripts which are related to the WA2L/edrc environment because they may disappear in future releases or its content may change without notice.

Use the edrcenv command within the shell or edrc to see the current environment settings.

$EDRC_NLS_DATE_FORMAT
national language support date format. The recovery point in time has to comply with this format.

$NLS_DATE_FORMAT
same as $EDRC_NLS_DATE_FORMAT.

$EDRC_NLS_LANG
national language support language name.

$NLS_LANG
same as $EDRC_NLS_LANG .

$DEBUG
used to debug recovery scripts or contributed commands. This variable is set to False (no debugging) or True (debugging). Your script should contain the following line to allow debugging:

test "$DEBUG" = True && set -x 

$EDRC_ENTRY_DIR
current directory where your recovery script is located or where you enter the filesystem tree when you invoke the shell command.

$EDRC_TMP_DIR
this variable points to a secure temporary directory that exists during the execution of a recovery script, contributed command or the shell command and is afterwards removed. This variable is therefore exported to recovery scripts, contributed commands and the shell command only.

This variable should be used to securely save temporary data during the execution of a recovery script or a contributed command.

$EDRC_TMP_DIR_SESSION
this variable points to a secure temporary directory that exists during the execution of an edrc session and is afterwards removed. This variable is exported to recovery scripts, contributed commands and the shell command only.

This variable should be used to securely save temporary data from recovery scripts or contributed commands that must be accessed multiple times throughout the edrc session.

You should add the name of the recovery script or contributed command as prefix to ensure a unique filename.


Example:

date > $EDRC_TMP_DIR_SESSION/$EDRC_SCRIPTNAME.begin

If you need to save temporary data during the execution of a recovery script or a contributed command the $EDRC_TMP_DIR variable shall be used.

$EDRC_OSID
the systems operating system id evaluated by osid. See osid(3) for more information.

$EDRC_SCRIPTS_BASEDIR
name of the recovery scripts basedir. This environment variable is set to the value you specified with the SCRIPTS_BASEDIR option in the edrc.cfg configuration file. See edrc.cfg(4) for more information.

$EDRC_ENV
name of the environment file. See description in section COMMANDS, at the env command. Therefore do *not* hard-code _env in your scripts, use this variable.

$EDRC_CONFIGFILE
name of the configuration file loaded in the current edrc session.

$EDRC_LOGFILE
logfile of the current script. Normally you will not have to write to this file by your own, edrc will redirect all output of your recovery script to this file.

$EDRC_RECOVERYTIME
point in time to recover to. See description in section COMMANDS, at the setrec command.

$EDRC_SCRIPTNAME
name of the recovery script (without the "<menu_point>:" part). If you use the msg command for message output this name will appear in front of the "-" sign.

$EDRC_MENUPOINT
menu point of the recovery script (without the ":<scriptname>:" part).

$EDRC_SESSION
name of the edrc session. If you use the log command (what will normally not be the case in recovery scripts) the session name is written between the square brackets into the logfile ( $EDRC_LOGFILE ).

$EDRC_CONTRIB_VARDIR
var directory for contributed commands. This environment variable is only exported to contributed commands. If you have to save persistent information store it to this location.

You should add the name of the contributed command as prefix to ensure a unique filename.


Example:

date > $EDRC_CONTRIB_VARDIR/$EDRC_SCRIPTNAME.begin

$EDRC_SEED
session persistent random seed number.

$EDRC_SHELLHIST
history file for the shell started with the shell EDRC command. This environment variable is only exported to the shell started within edrc.

$EDRC_DIST_USER
this variable equals to the DIST_USER setting in the etc/edrc.cfg file.

$EDRC_DEBUG
switch all commands in edrc/bin and edrc/lib into debugging mode. This allows to debug also commands that don't have the debugging option -x implemented.

Do not mix up this environment variable with the $DEBUG environment variable. When debugging recovery scripts only the $DEBUG variable is of significance.

$EDRC_DEBUG_COMMAND
switch a command in edrc/bin or edrc/lib into debugging mode. This allows to debug also commands that don't have the debugging option -x implemented.

Do not mix up this environment variable with the $DEBUG environment variable. When debugging recovery scripts only the $DEBUG variable is of significance.

$TODAY
current date in the form YYYYMMDDD (example: 20061021).

 

SIGNALS

The following signals are handled by edrc. Do not use other signals as those listed below, as long as you do not really know what you are doing and what the consequences are.

INT
interrupt from keyboard (Ctrl+C).
If ABORT_MODE is set to hard edrc will abort completely, if ABORT_MODE is set to soft only the current running command or recovery script will be aborted.

TERM
kill the process without an argument.
If ABORT_MODE is set to hard edrc will abort completely, if ABORT_MODE is set to soft only the current running command or recovery script will be aborted.

USR1
the edrc command will perform a "soft" abort, as if ABORT_MODE is set to soft.

USR2
the edrc command will perform a "hard" abort, as if ABORT_MODE is set to hard.

 

EXIT STATUS

0
no error.

1
you started edrc using the wrong operating system user.

2
operating system is not supported. See osid(3) if you get this error.

3
version printed.

4
usage listed.

5
program aborted (Ctrl+C ...).

6
the configuration file does not exist.

7
the directory specified in SCRIPTS_BASEDIR does not exist.

8
edrc was started using the -n session_name option and another session with the same session_name is already running on this host.

9
the edrcrevision.cfg file is missing or the VERSION or PATCHLEVEL options within this file are not set properly.

10
edrc was started in trunk mode from a remote system and the trunk root menu does not exist.

11
a temporary directory could not be claimed or created in /tmp. Check the system temporary directory /tmp if you get this error, it is an indicator of system intrusion.

 

FILES

The name(1) command can be used to list a short description of files and directories.

etc/edrc.cfg
configuration file of edrc, see edrc.cfg(4) for more information.

etc/edrcrevision.cfg
configuration file which holds the current version and patchlevel of EDRC. See edrcrevision.cfg(4) for more information.

etc/exrc
configuration file for the vi-Editor and viewer started within edrc. See svi(1), exrc(4) and vi (1) for additional information.

etc/shell.cfg
generic configuration file for the shell started by the shell command. This file is read by the etc/kshrc shell startup file. The intention of this configuration file is to be able to configure some shell variables without changing the more complicated kshrc file.

etc/kshrc
startup file for the shell started by the shell command. Normally you won't have to change this file, changing configurations are handled in the etc/shell.cfg file. See kshrc(4) for more information.

contrib/edrc/
contributed commands to edrc. Do not change the edrc program if you miss a general command. Create the command in this directory and you will be able to invoke it as it is an edrc internal command. This will protect you from loosing your work after an upgrade of edrc and will keep the edrc command itself stable.

lib/
commands which are mostly used within scripts. Some of them require some environment settings. This directory is in $PATH

lib/edrc/
library functions called by the edrc command.

scripts/
here are all recovery scripts stored by default. The content of this directory has to be customized to your environment. For a description how to write scripts for EDRC see edrcscripts(1M) or the example configuration included in the WA2L/edrc package.

.sav
backup directory in a recovery script tree. Whenever a file in edrc is edited or removed a backup copy is automatically saved into the .sav directory of the current menu (=subdir). Therefore, if you like to restore a file to a prior version, invoke the shell command in edrc, change to the .sav directory and restore the desired file using the normal operating system commands. The .sav directory is excluded from distributions when invoking the distribute command.

var/backup/
several backups.

var/contrib/edrc/
var directory for contributed commands. The $EDRC_CONTRIB_VARDIR environment variable points to this directory. See section ENVIRONMENT for information how to save persistent information in contributed commands.

var/lock/
lockfiles. Do not edit them by hand.

var/log/
all logfiles of the EDRC environment. Here the logfile of edrc and the output of all recovery scripts is saved. Therefore customizing scripts don't have to implement an own logging mechanism. All output sent to stdout and stderr will be saved in a designated logfile.

var/repl/
this directory is used to save scripts replicated with the distribute EDRC command.

var/connection/security/<DIST_USER>/<DIST_MODE>/{<host_from>|default}/{<host_to>|default}
this directory holds security information used for example by secure shell connections. See edrc.cfg(4) for more information about the currently possible DIST_MODE settings and remote_shell(3) and remote_copy(3) for more information about the var/connection directory.

var/connection/cache/<DIST_USER>
this directory holds the cache of successful connections. This is used to speed up the initialization of a connection due to the fact that the first try is to use the DIST_MODE first which resulted already in a successful connection.

var/repl/own.<cfg>.full.cpio.gz
full distribution file created on the local host. This archive contains all scripts from SCRIPTS_BASEDIR defined in the configuration file cfg.

var/repl/rec.<cfg>.full.cpio.gz
full distribution file created on a remote host and distributed to the local host. This archive contains all scripts from SCRIPTS_BASEDIR defined in the configuration file cfg.

var/repl/own.<cfg>.diff.cpio.gz
differential distribution file created on the local host. This archive contains all scripts from SCRIPTS_BASEDIR defined in the configuration file cfg which are newer then the most recent full distribution file available on the local host.

var/repl/rec.<cfg>.diff.cpio.gz
differential distribution file created on a remote host and distributed to the local host. This archive contains all scripts from SCRIPTS_BASEDIR defined in the configuration file cfg which are newer then the most recent full distribution file available on the remote host where the distribution file comes from.

var/settings/
persistent settings.

var/shell/
Here the shell history of each session of the interactive shell built in to edrc and the own history of edrc is kept.

 

SEE ALSO

edrcintro(1), edrc.cfg(4), edrcrevision.cfg(4), bash(1), catcomp(1), contrib.edrc(1m), Emergency Handbook, envpasswdstrip(1), hostlist(3), hostlist.cfg(4), ksh(1), llcomp(1), lscomp(1), lscp(1), lsmv(1), name(1), osid(3), remote_copy(3), remote_shell(3), scriptgrep(1), sh(1), shell(1), vi(1), view(1)

 

NOTES

-

 

BUGS

-

 

AUTHOR

edrc was developed by Christian Walther. Send suggestions and bug reports to wa2l@users.sourceforge.net .

 

COPYRIGHT

Copyright © 2021 by Christian Walther

This is free software; see edrc/doc/COPYING for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


 

Index

NAME
SYNOPSIS
AVAILABILITY
DESCRIPTION
OPTIONS
COMMANDS
ENVIRONMENT
SIGNALS
EXIT STATUS
FILES
SEE ALSO
NOTES
BUGS
AUTHOR
COPYRIGHT

This document was created by man2html using the manual pages.
Time: 11:56:13 GMT, March 29, 2025