Avamar: How to list backup activities over 72 hours
Summary: By default activities and events are displayed on the Avamar Administrator UI for 72 hours (maximum 5000 events). To list activities and events beyond the default, the MCS database can be queried. ...
Instructions
By default activities and events are displayed on the Avamar Administrator UI for 72 hours with a maximum number of visible events of 5000.
Although these older events are not visible from the activity monitor, they are still recorded in the Management Console Server (MCS) database MCDB, and psql commands can be used to query the database.
- To list the backup activities start from a particular date and time, run the following command:
psql -p 5555 mcdb -U admin -c "select recorded_date_time,client_name,status_code_summary from v_activities_2 where recorded_date_time > 'yyyy-dd-mm hh:mm:ss';"
Enter the required date and time. The format is: "yyyy-mm-dd hh:mm:ss"
For example:
psql -p 5555 mcdb -U admin -c "select recorded_date_time,client_name,status_code_summary from v_activities_2 where recorded_date_time > '2025-01-10 00:00:00';"
recorded_date_time | client_name | status_code_summary
-------------------------+---------------------------+-----------------------------------------------------------
2025-01-11 10:52:47.75 | client1.example.com | Activity completed successfully.
2025-01-11 10:59:23.568 | client1.example.com | Activity failed - timed out before starting.
2025-01-12 14:48:55.954 | client1.example.com | Activity failed - timed out before starting.
2025-01-18 04:00:00.068 | client2.example.com | Activity failed - client has no data specified by dataset
2025-01-18 13:02:58.797 | client2.example.com | Activity completed successfully.
2025-02-04 14:55:11.498 | client2.example.com | Activity cancelled.
2025-02-04 16:04:46.43 | client2.example.com | Activity failed - timed out before starting.
2025-02-04 16:55:50.225 | client2.example.com | Activity cancelled.
- To list backup activities from a particular client, run the following command:
psql -p 5555 mcdb -U admin -c "select recorded_date_time,client_name,status_code_summary from v_activities_2 where client_name='<client-to-query>';"
Replacing the client-to-query with the required client.
For example:
psql -p 5555 mcdb -U admin -c "select recorded_date_time,client_name,status_code_summary from v_activities_2 where client_name='client1.example.com';"
recorded_date_time | client_name | status_code_summary
-------------------------+---------------------------+----------------------------------------------
2025-01-11 10:52:47.75 | client1.example.com | Activity completed successfully.
2025-01-11 10:59:23.568 | client1.example.com | Activity failed - timed out before starting.
2025-01-12 14:48:55.954 | client1.example.com | Activity failed - timed out before starting.
2025-02-15 13:42:31.281 | client1.example.com | Activity completed successfully.
2025-02-15 15:03:36.124 | client1.example.com | Activity failed - client error(s).
2025-03-19 08:09:14.256 | client1.example.com | Activity completed successfully.
2025-03-19 12:14:03.288 | client1.example.com | Activity failed - client error(s).
2025-03-20 03:06:40.599 | client1.example.com | Activity completed successfully.
- To list the backup activities that failed, run the following command:
psql -p 5555 mcdb -U admin -c "select recorded_date_time,client_name,status_code,status_code_summary from v_activities_2 where status_code!='<code-to-query>';"
Replacing the code-to-query with the required code.
(In this instance, the use of the "!" means "not" as the code 30000 is "Activity Completed Successfully")
For example:
psql -p 5555 mcdb -U admin -c "select recorded_date_time,client_name,status_code,status_code_summary from v_activities_2 where status_code!='30000';"
recorded_date_time | client_name | status_code | status_code_summary -------------------------+---------------------------+-------------+----------------------------------------------------------- 2025-01-11 10:59:23.568 | client1.example.com | 30901 | Activity failed - timed out before starting. 2025-01-18 04:00:00.068 | client2.example.com | 30915 | Activity failed - client has no data specified by dataset 2025-02-04 14:55:11.498 | client2.example.com | 30010 | Activity cancelled. 2025-02-04 16:04:46.43 | client2.example.com | 30901 | Activity failed - timed out before starting. 2025-02-04 16:55:50.225 | client2.example.com | 30010 | Activity cancelled. 2025-02-05 09:37:10.636 | client2.example.com | 30901 | Activity failed - timed out before starting. 2025-02-15 14:00:01.216 | client2.example.com | 30901 | Activity failed - timed out before starting. 2025-03-11 07:28:43.385 | client2.example.com | 30010 | Activity cancelled. 2025-02-15 15:03:36.124 | client1.example.com | 30999 | Activity failed - client error(s). 2025-02-16 14:00:01.24 | client2.example.com | 30901 | Activity failed - timed out before starting.
Additional Information
The Activities table (v_activities_2) in the MCS database (MCDB) contains the following entries that can be used to tailor queries:
View "public.v_activities_2"
Column | Type | Modifiers
---------------------------+-----------------------------+-----------
recorded_date | date |
recorded_time | time without time zone |
recorded_date_time | timestamp without time zone |
cid | character varying |
session_id | character varying |
client_name | character varying |
domain | character varying |
group_name | character varying |
plugin_number | integer |
plugin_name | character varying |
type | character varying |
initiated_by | character varying |
dataset | character varying |
effective_path | character varying |
dataset_override | boolean |
retention_policy | character varying |
effective_expiration_ts | character varying |
effective_expiration | text |
retention_policy_override | boolean |
schedule | character varying |
scheduled_start_ts | timestamp without time zone |
scheduled_start_date | date |
scheduled_end_ts | timestamp without time zone |
scheduled_start_time | time without time zone |
scheduled_end_date | date |
scheduled_end_time | time without time zone |
started_ts | timestamp without time zone |
started_date | date |
started_time | time without time zone |
completed_ts | timestamp without time zone |
completed_date | date |
completed_time | time without time zone |
num_of_files | double precision |
bytes_scanned | double precision |
bytes_new | double precision |
bytes_modified | double precision |
bytes_modified_sent | double precision |
bytes_modified_not_sent | double precision |
status_code | integer |
error_code | integer |
encryption_method | text |
encryp_method2 | character varying |
encryp_method2_sa | boolean |
bytes_excluded | double precision |
bytes_skipped | double precision |
num_files_skipped | double precision |
client_os | character varying |
client_ver | character varying |
bytes_overhead | double precision |
status_code_summary | character varying |
error_code_summary | character varying |
backup_label | character varying |
backup_number | character varying |
systemid | character varying |
expiration_ts | character varying |
expiration | text |
createtime | integer |
original_retention | character varying |
current_retention | character varying |
proxy_cid | character varying |
display_name | character varying |
server | character varying |
wid | character varying |
ddr_hostname | character varying |
ddrid | character varying |
hard_limit_exceeded | boolean |
soft_limit_exceeded | boolean |
bytes_protected | double precision |