AmControl is a
PythonLanguage? class for controlling an
AmandaBackup? server. At present, it can:
- Launch a backup
- Flush the remnants of a previous backup to tape
- Get the status of a currently-running backup
- Get the name of the next tape to use
- Eject a tape
- Retension a tape
- Rewind a tape
I built
AmControl for my own purposes (but with an eye toward flexibility). It was designed with a few assumptions:
- AmandaBackup? runs on a FreeBSD server
- Affects the syntax of the tape control commands
- The SystemAdministrators? have configured SuDo? to allow users to run certain commands with the appropriate privileges:
- amdump, amflush, amstatus, and amadmin as the user with backup access
- mt as the user with tape control access
As of version 1.1,
AmControl opens persistent shells on the local or remote servers instead of opening a new session for every request. The end result is a dramatic increase in responsiveness in the GUI clients, and less load on remote servers when they're busy handling the actual backup process (because we're not continually building up and tearing down SSH sessions).
Three interface programs are included with
AmControl and are the reason that
AmControl was written in the first place:
AmCommand?
This is a command-line interface to
AmControl. Use this for scripting backup jobs.
AmGui?
This is a GUI interface to
AmControl. It gives a
BackupAdministrator? the ability to launch and monitor backups from the convenience of an X desktop, and its short list of dependencies (basically Tkinter) means that it can be run from almost anywhere that Python is installed.
AmGui2?
AmGui2? is a completely new implementation of a GUI around
AmControl, based on
WxWidgets?, incorporating icons, menus, and other niceties. If you have access to Python's "wx" class, then this is the clear choice for everyday use.
Requirements
- The programs were written with Python 2.3, but may run with Python 1.5 and above.
- AmGui? uses the TkInter? widget set for a simple cross-platform compatibility.
- AmGui2? uses WxWidgets? for a much more pleasant cross-platform GUI.
- SSH for running remote commands.
- SuDo? for running commands as other users.
History
- 2004-08-27 - 1.1:
- Second public release featuring AmGui2? and persistent shells
- 2003-02-14 - 1.0:
*Initial public release
Upgrading
From 1.0 to 1.1
In this release, configuration files are now required to be in a format readable by Python's
ConfigParser? module. You
must convert your configuration files before you can use the new version, as I've made no attempt to provide backward compatibility with the old format. I apologize for the inconvenience, but the parser I wrote was very limited and possibly fragile. See the included "amcontrol.conf.sample" file for an example setup.
Also, amcommand.py and amgui2.py now accept the name of a configuration to use in their command line arguments. This means that you can write multiple setups and switch between them at will without editing any config files.
Bugs and Limitations
- Only FreeBSD tape commands are implemented (although adding a command set for other OperatingSystems would be trivial - contact me if you need something else).
- Commands can only be executed on remote machines via SSH.
License
AmControl,
AmCommand?,
AmGui?, and
AmGui2? are released under the terms of the BSD license. This is the same license used by
AmandaBackup? itself, so they can be used, modified, and distributed in exactly the same ways.
The graphics contained in icons.py are redistributable under the terms of the GNU Free Documentation License. This seemed like a reasonable choice, but if this causes a problem with your intended use then please contact me and we can arrange other Free terms.
--
KirkStrauser - 27 Sep 2004