Wednesday, August 1, 2012

My Avamar Commands ref.


To restart mcs + ems following the command:
1. login as user admin and loaded keys with
ssh-agent bash
ssh-add ~admin/.ssh/dpnid
2. following the command to stop mcs + ems service.
emserver.sh --stop
mcserver.sh --stop
3. make sure there is no mcs and ems process running, kill the process if still exist
ps -ef | grep mcserver
ps -ef | grep emserver
4. restart the mcs and ems service, use --ignore_lock only after you have looked around and you have determined that it is safe to break the lock
emserver.sh --start (--ignore_lock)
mcserver.sh --start (--ignore_lock)

======================



Getting an overview about your Avamar Box:

su – admin

ssh-agent bash

ssh-add /home/admin/.ssh/dpnid



status.dpn

capacity.sh

mccli server show-prop



======================
Expire Avamar Backup commands:

=======================

1st way#
----------

-          Please find below the steps to run the expire-snapups script to expire backups in a date range:

The expire-snapups command writes a script to stdout, which when run, changes backup expiration dates.

Synopsis:
expire-snapups [--after=DATE] [--before=DATE] [--days=NUM][--domain=DOMAIN] [--help] [--include_mc_backups][--replicate --dstserver=SERVER --dstid=USER@PATH--dstpassword=PASSWORD [--dstdomain=DOMAIN]] [CLIENT-PATH ...]

You can use “expire_snapups” script which will set the expiration date after x days so you can run it as the following for example:

Example:
# expire-snapups --before=20130201 --domain=/ --days=1 > expire-backups-out
This will set the expiration date for all backups under ”/” domain which are created before “Feb 1, 2013” for one day so the GC will recover them the following day.  Please note to load the dpn keys before running the script:

After creating a script with the desired backup deletion parameters, type the following to delete the backups from the Avamar server:
# /bin/sh -x ./expire-backups-out





Change the expiration date of these backups please follow the below steps to execute the expire-snapups output :
1)    Login to the utiliy node as user admin.
2)    Load the ssh-keys :
# ssh-agent bash
# ssh-add /home/admin/.ssh/dpnid
3)    /bin/sh -x ./expire-before-march
4)    /bin/sh –x ./expire-after-march 

 ---------------------------------------------------------------------------------------------------
2nd Way# 
-----------
1) Find a list of domains on the Target server
-mccli domain show --recursive=true --domain=/

2) Run delete snapups script against each domain to get a list of commands to delete backups before a certain day (20131023) these backups are belong  to all clients under this domain
The o/p will be appended to a file in our case delete-backups-out
-delete-snapups --before=20131023 --domain=/REPLICATE/ABCavmr01/172.16.1.150/VirtualMachines > delete-backups-out

3) Run the o/p file to delete the backups
-/bin/sh –x ./delete-backups-out

Please remove the file once it is done
-rm delete-backups-out

4) The last 2 steps have been repeated against the below domains in green

5) Run Garbage collection to free space
- Our recommendation is to leave the scheduled GC to run and decrease the utilization
- I have run manual GC to save some time and now capacity is 83.8 % and GC is still in progress
- I have increased the blackout window to be 6 hours to give more time for the gc to run and decrease space
- we can get this value back to default 3 hours after the utilization decreased

Note:
- I have stopped the replication from the source to prevent adding more data

After the GC finish run the below commands

- avmaint config --ava indexcacheallowed=1
- dpnctl start maint

Please run step 2 and 3 against the domains you want to delete and leave the scheduled GC to free space
You have to run the scripts before the GC start to take effect,  GC start at 8 AST
You can’t run the script while the server in read only mode (GC or CP running)

Here is a list of all the domain on the target

admin@ABCdravmr01:~/>: mccli domain show --recursive=true --domain=/
0,23000,CLI command completed successfully.
Name            Domain                            Contact Phone Email Location
--------------- --------------------------------- ------- ----- ----- ----------------------------------------
clients         /                                                     667be9cfc196f6ce999c415c0e9f939195df3def
MC_RETIRED      /                                                     bf5a0b9e203241fcd48885443ef68e0bc1c61938
REPLICATE       /                                                     7031d2a28a5a7e66ef9dd2ea0976b111f9961926
ABCavmr01       /REPLICATE                                            e9ea29a9ae1f8bb6fd173062aec3cd9b7d85d5ba
10.7.1.79       /REPLICATE/ABCavmr01
172.16.1.150    /REPLICATE/ABCavmr01
172.16.1.155    /REPLICATE/ABCavmr01
clients         /REPLICATE/ABCavmr01                                  8891c95079331fa504c9f2dacec74cf6e6fbffb2
MC_RETIRED      /REPLICATE/ABCavmr01                                  155a7c1f962f548d16bfcdc2ccb0ff3f01c5a29e
NDMP_DM2        /REPLICATE/ABCavmr01
Physical        /REPLICATE/ABCavmr01
proxy           /REPLICATE/ABCavmr01
VirtualMachines /REPLICATE/ABCavmr01/10.7.1.79
VM-Backup       /REPLICATE/ABCavmr01/10.7.1.79
Temp.Backup     /REPLICATE/ABCavmr01/172.16.1.150
VirtualMachines /REPLICATE/ABCavmr01/172.16.1.150
VM-Group1       /REPLICATE/ABCavmr01/172.16.1.150
VM-Group2       /REPLICATE/ABCavmr01/172.16.1.150
VM-Group3       /REPLICATE/ABCavmr01/172.16.1.150
VM-Group4       /REPLICATE/ABCavmr01/172.16.1.150
VM-Group5       /REPLICATE/ABCavmr01/172.16.1.150
VM-Group6       /REPLICATE/ABCavmr01/172.16.1.150
VM-Group7       /REPLICATE/ABCavmr01/172.16.1.150
VM-Group8       /REPLICATE/ABCavmr01/172.16.1.150
VirtualMachines /REPLICATE/ABCavmr01/172.16.1.155
proxy           /REPLICATE/ABCavmr01/clients

No comments: