On Wed, Sep 23, 2020 at 10:10:21 +0700, Olivier wrote:
> Does it exist a command that can be used to check whether amanda is busy
> or not?
>
> For example, do not launch the daily backup if the previous one is still
> running, or do not reboot Amanda server (network stability issue) if a
> backup is being done.
I don't know of a straightforward Amanda-provided command to do exactly
this.
(Note that in older versions, Amanda would abort a new amdump run if an
old run was still underway, but in v3.5 there is support for concurrent
runs so it specifically doesn't abort automatically any more.)
In general, you can look to see if /var/log/amanda/<CONFIG>/amdump
exists. That symlink is created when amdump starts, and renamed to
"amdump.1" as amdump finishes, so if the "amdump" symlink still exists
than the job is still running (... or it died without cleaning up).
If you are programming a script to check for this, you might also check
for an "amflush" symlink at the same time -- that symlink exists while
amflush is running, and depending on your configuration you might not
want to start a new amdump job while amflush is running, either.
For a manual check, you can run the "amstatus' command to see the status
of either the current in-progress run (if it shows the amdump or amflush
file) or last-complieted run (amdump.1/amflush.1).
Nathan
----------------------------------------------------------------------------
Nathan Stratton Treadway - [email protected] - Mid-Atlantic region
Ray Ontko & Co. - Software consulting services - http://www.ontko.com/
GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt ID: 1023D/ECFB6239
Key fingerprint = 6AD8 485E 20B9 5C71 231C 0C32 15F3 ADCD ECFB 6239