Unsolved

This post is more than 5 years old

1 Rookie

 • 

94 Posts

8420

September 23rd, 2013 14:00

Avtar Command Line Backup Questions

I'm trying to run the "avtar" backup command on the utility node pointing at a Windows server using the "--path=/clients/servername" option in the command. After the backup runs I look at server the "Backup and Restore" list and see it listed with a plugin of "Linux File System" instead of "Windows File System". I also noticed that it's not really backing up the Windows folders that I'm expecting to see. Instead I see a list of files that look like a Linux file structure.

I've tried specifying the --plugin-list=3000 (and 3001) in the "avtar" command but that doesn't change the plugin on the backup. I'm thinking that as far as the actual files being backed up I'm seeing a Linux file list because of the plugin.

I tried running the backup from the actual Windows client and everything looks right. The problem is that when I run the backup this way I don't see the backup in the activity monitor. If I run the backup on the utility node the completed backup statistics show up in the activity monitor. I'm not sure if it is possible to run the avtar command from one Windows server to backup another server.

The whole problem I'm trying to solve is this:

I have month-end backups that need to run but the time they can run can vary depending on how long the month-end processing takes. Because on-demand backups don't allow retentions to be set appropriately from the GUI I need to run the backup via command line. I need to make this as simple as possible for our night operator while allowing for monitoring and tracking capabilities.

If someone has a better approach I'd be interested in hearing it. If not I'd really appreciate it if someone could tell me how I can run command line backups and make sure the plugin is correct.

4 Operator

 • 

2K Posts

September 23rd, 2013 22:00

Please consider moving this question as-is (no need to recreate) to the proper forum for maximum visibility.  Questions written to the users' own "Discussions" space don't get the same amount of attention and can go unanswered for a long time. 

You can do so by selecting "Move" under ACTIONS along the upper-right.  Then search for and select: "Avamar Support Forum".

1 Rookie

 • 

94 Posts

September 24th, 2013 07:00

Sorry. Thought I had created it in the Avamar support forum to begin with. Must not have clicked on the link.

2 Intern

 • 

2K Posts

September 24th, 2013 07:00

It is not possible to back up a system by running an avtar command on a different system. The avtar command will back up the system where it is running, so it is very likely that you have inadvertently backed up the filesystem of the Avamar utility node to this client account.

If you need to run backups of remote systems from the command line, you are probably looking for the mccli command.

Take a look at the Avamar MCCLI Programmer Guide:

Avamar 6.0 MCCLI Programmer Guide

Avamar 6.1 MCCLI Programmer Guide

1 Rookie

 • 

94 Posts

September 24th, 2013 09:00

Thanks for the reply. I'd started looking a bit at the MCCLI commands and got the remote client to backup but the problem I have is being able to set the appropriate retention now when the backup runs. I looked at the "mccli client edit" command and tried modifying the retention using that command but no luck.

From what I understand the "mccli client edit" command can set options on the client so that if a specific dataset is used with a specific retention policy then that will override the "None" that the on-demand backup retention will be set to but that doesn't appear to be working. Maybe I've got something screwed up in my syntax and am missing an option? I'm using this command:

mccli client edit --dataset=Test_Laptop_Dataset --domain=/Serverdomain --name= --retention="Policy and Financial"

I'm also wondering if I need the "--override-cis-retention=true" option or if my problem is the "Policy and Financial" in the retention setting?

Thanks.

2 Intern

 • 

2K Posts

September 24th, 2013 10:00

Editing the client directly will only override the dataset, retention, etc. for scheduled backups (and then only if the appropriate override-* option is set to true -- override-dataset, override-retention, etc.).

The way I would approach this is to create a new group for the affected client(s), configure the appropriate dataset and retention for this group, then use the "mccli group backup" command to initiate the backup as needed. Using this approach should force the backup to run as a scheduled backup so the correct retention will be applied.

Alternatively, you could kick off the backup manually using mccli client backup-dataset or one of the related commands and alter the retention tags and expiration date using mccli backup edit after the backup completes.

Please let me know if you run into any issues.

2 Intern

 • 

2K Posts

September 24th, 2013 11:00

It's possible to install mccli on an external system running Red Hat. The MCCLI guide has steps on how to do this. Presumably it would work on CentOS as well but that's not officially supported.

I have also seen customers set up scripts using tools such as Plink to connect to the utility node and run the mccli commands remotely.

My pleasure!

1 Rookie

 • 

94 Posts

September 24th, 2013 11:00

I created a new policy for this backup and set the appropriate dataset, schedule was the "on-demand" schedule, retention policy was the appropriate retention policy. When I ran the backup using the "mccli group backup" command specifying this policy the backup ran but the retention was still set to "N" instead of the retention I'm wanting.

At this point I'm thinking I may have to use the combination of the mccli client backup-dataset and then alter the retention. The good thing is that the replication doesn't happen immediately so I should be able to set the retention before the replication to our DR grid happens. I don't want to get them out of sync.

One of the problems I see with this is that I don't want our night operator logging into the utility node to kick off these backups. Can I use a script language like PowerShell to create a script that will call the appropriate mccli commands?


Thanks.

1 Rookie

 • 

94 Posts

September 24th, 2013 11:00

So in order to get the retention I want I'll have to modify the "Daily", "Weekly", "Monthly" and "Yearly" retentions to get the retention I want?

2 Intern

 • 

2K Posts

September 24th, 2013 12:00

The retention tags and backup expiration are assigned at backup creation time. For scheduled backups, the expiration is set at backup time based on the retention tags applied (Yearly overrides Monthly, Monthly overrides Weekly, etc.). After backup creation, you would have to set the appropriate retention tags and update the expiration -- the expiration will not be modified just because you modify the retention tags.

2 Intern

 • 

2K Posts

September 24th, 2013 12:00

That's correct, yes. You can retrieve most (all?) mccli output in XML format by specifying the --xml parameter if XML is a better format for you, e.g. mccli backup show --name=/clients/testclient.example.com --xml

1 Rookie

 • 

94 Posts

September 24th, 2013 12:00

So basically I'll have to update the backup twice, once to set the appropriate retentions (D,W,M,Y) and then update it again to set the expiration date according to largest retention.

Example:

Set the retention to Daily, Monthly on a month end backup then set the expiration date to backup date + 1 year since that's the retention we want on some of our monthly backups.

Now I just need to see if I can get the LabelNum from the "mccli backup show" in my script so I update the proper backup.

2 Intern

 • 

2K Posts

September 25th, 2013 06:00

I have set up public / private key authentication in the past. You can use change-passwords to authorize additional public keys.

1 Rookie

 • 

94 Posts

September 25th, 2013 06:00

Is there documentation on how to do this? I'm reading a document on plink and it says to modify the authorized_keys2 file but when I do that file is readonly. I don't want to screw something up.

Thanks.

1 Rookie

 • 

94 Posts

September 25th, 2013 06:00

So I'm playing with plink to see if I can get it to log into the utility node. Have you ever tried setting this up to use public/private key authentication? I really don't want to have to enter the password when the job runs.

Thanks.

2 Intern

 • 

2K Posts

September 25th, 2013 06:00

Essentially you need to generate a keypair on the machine where the script will run, then use change-passwords on the Avamar utility node to add the public key from that keypair to the authorized_keys2 file. I believe change-passwords is documented in the Administration guide.

Top