Scripting ABR...How do I...??
So here is what I want to do. Our backups each night will get copied to an off-site storage node. BUT, instead of keeping ALL backups offsite, what I really want to do is have everything in the LATEST backup for disaster recovery purposes. This will obviously also save space on our offsite storage node.
This means, that once today's backup is replicated to the offsite storage node, I need to convert it to a full and delete any previous backups. I *think* can do this with the pre/post commands in the backup options, and write a batch file that performs the necessary commands using acrocmd.exe (someone please correct me if I'm wrong here).
So, as such, I have quite a few questions.
1) What happens if it's already a full backup that get's replicated? I imagine the command will just see it as a full, and not do anything??
2) do I absolutely have to specify which backup to convert with the --backup option or does it default to the latest?
3) the reason for #2 above, is if I have to specify WHICH backup to convert, how can I do it? If I use the 'list backups' command, on an archive, I see the following:
---
acrocmd.exe list backups --service=asn --loc=bsp://storage_node/SN_Script --credentials="domain\backup",password --arc=sntiDev
GUID Type Date Comments
-------------------- -------------------- -------------------- --------------------
E1076CE5-11F9-48F3-...full 21.08.2012 15:18:36 sntiDev
0112A960-47E3-4818-...full 22.08.2012 14:20:11 sntiDev
73F436A6-9CFA-4E6D-...full 12.09.2012 04:12:38 sntiDev
5DDAE55F-BF0F-4E8B-...incremental 01.11.2012 04:06:03 sntiDev
The operation completed successfully.
---
Note that the GUID of the backup is NOT fully listed, so how can I specify the full GUID in the --backup parameter when I can't even see it?
4) even if I *could* see the full GUID, how do I capture it and then pass it as a parameter to the 'convert full' command?
5) Similar for delete backups. I want everything but the latest backup (after the convert to full) in the archive deleted. If I have to specify which backup(s) that is, How can I do it?
I know this is a lot of info but any tips/help in how best to script ABR would be most useful.

- Log in to post comments

If you delete the previously replicated backup from the offsite storage node before replicating a new one, the replication will produce a new full backup. Or you can delete this old backup after you performed the "convert to full" operation.
- Log in to post comments

Well, I don't feel comfortable with trusting the replication to create a new full backup, as opposed to say replicating the entire CURRENT backup chain on the onsite backup.
I'd rather replicated today's backup, convert full, then delete the old one. But doing that with a script is not easy. I'm testing the convert full, but the deletion of the old one is proving to be challenging as I'd have to output raw, somehow grab that output and feed it back into the script to go delete the old backup. Do that for each archive in the vault. and ONLY do that after the ENTIRE backup plan is complete. I get emails from each of my virtual appliances when their portion of the backup plan is complete but have no idea how it would affect his.
ALSO, if I have a series of backups currently stored offsite as follows:
F1..D1..D2..D3..D4..I1..I2..I3 (where F= full, D=differentail, and I=Incremental)
If I click choose to convert full on I3, does it include all previous incrementals and differences back to the full? so if I3 was last night's backup, and I convert full and had to restore the entire server from that backup, would it be as that point in time?
- Log in to post comments

Did you try to set up retention rules in the 2nd location as per the screenshots?
>if I3 was last night's backup, and I convert full and had to restore the entire server from that backup, would it be as that point in time?
Exactly, as that point of time. This also means that if, say, file A.txt appeared in D1 and was deleted by I3, this file will be missing in the resulting full backup.
Attachment | Size |
---|---|
115771-104566.png | 16.55 KB |
115771-104569.png | 50.95 KB |
- Log in to post comments

No, as I don't see retention rules for the 2nd location. Additionally, the 2nd location is a storage node and thus consolodate backups is not available.
Attachment | Size |
---|---|
115793-104575.png | 52.11 KB |
- Log in to post comments

Retention rules with consolidation work on a storage node. In your case, the problem is in the GFS scheme - it does not allow custom retention rules. It presumes that the same retention rules are used in all of the locations. So, achieving the result you wish is really tricky.
The 'consolidate' command is just not implemented for the asn service, but the symmetrical 'delete' command works. To obtain the full GUIDs, use --output_raw.
- Log in to post comments

That would be nice if I could then find some way to take the output and feed it back in via a script. So far I've tried to write a batch file (test.bat) that would execute at the end of the backup (see attached Screenshot). It contains 1 command:
C:\Program Files (x86)\Acronis\CommandLineTool\acrocmd.exe convert full --service=asn --loc=bsp://storage_node/SN_Script --credentials="domain\user",password--arc="sntiDev_Archive(1)"
But the backups finish with an exit code of 127. No log or anything that contains any useful information in what I'm doing wrong. I've even tried to put that command in on it's own (command part then argument part) and it still fails. BUT, I can execute that command just fine at a command prompt.
Quite frankly, the whole thing is ticking me off because the documentation on who to properly script ABR is non-existent. It says you can write a batch file. OK, how? Examples? All we have is the commandline reference guide and that's it. Nothing else. No example usage of pre/post commands or pre/post data capture commands.
Attachment | Size |
---|---|
116036-104623.png | 64.22 KB |
116036-104626.png | 25.16 KB |
- Log in to post comments

Quite frankly, making a product do things it is not designed to do is not subject to documenting:) If you stick to GFS, be ready to think in terms of 'backup sets', i.e. Daily, Weekly, and Monthly backups as 3 indivisible sets. Some products can replicate, say, only Monthly backups. But no one tries to apply different retention rules over the GFS retention rules. The command-line interface is designed to automate things that can be done through UI - but not to do things that cannot be done through UI.
That said, are you sure that the replication has finished by the time the command starts? Does ASN do anything or just errors out? What is the full error code? Hope, it can be found in the ASN logs (on the management server, filtered by Events).
- Log in to post comments

But this is doing something the product *is* designed to do. Run a script pre/post backup job. Says so in the documentation that is there. It just says you can add a .bat file as a script but no real examples showing how to do it, any gotchas, etc.
There is nothing in the logs, I looked. I just get an error 127 in my email message. I'm trying to do some testing for scripting to try to automate certain features, but it's not easy. I'm continuing to experiment and track things down, but I have a lot of questions which are not answered in the documentation or in the KB as far as I can find.
for example: if I use the convert full command (either in the GUI or with the command line tool) on the last backup (incremental or differential), when it creates the full, does it include everything up to that point? Here's something concrete:
I have F1...D1...D2...I1...I2...I3...I4...D3 (F=full, D=differential, I=incremental). If I run Convert full on D3, does it include everything from the previous backups to create the new full? What about if I did it at I4?
There are also no examples of using PowerShell with ABR, yet there is indication that PS does indeed work with ABR, there was even a specific patch put out a while ago to fix an issue with that. Do I have to quote the command in the bat file because there is a space in the command line? Do I need to change directories first?
I've been a tech writer for many years and even published, and the documentation is lacking...severely. No index (should be 10% of your documentation), only quasi explaining features, lack of examples and/or decent screen shots, passive voice in some sections, etc. It's not good enough.
- Log in to post comments

A few finding/observations to finalize the case.
1) A post-backup command is executed after the backup but before the replication (this fact will be added to the documentation). Therefore, in your case it may start working only after the 3rd backup.
2) To examine the command log, you can add the --log parameter to the command line.
3) PowerShell scripts are currently not supported in pre/post commands, even within a bat file (yes, I know about http://kb.acronis.com/content/2844). The fix is targeted the nearest update.
4) Using acrocmd in pre/post commands is technically possible but generally not recommended.
5) *I have F1...D1...D2...I1...I2...I3...I4...D3 (F=full, D=differential, I=incremental). If I run Convert full on D3, does it include everything from the previous backups to create the new full? What about if I did it at I4?*
You've already answered this question, and I confirmed: "would it be as that point in time?" - "Exactly, as that point of time." The doc says the same: "incremental or differential backup is replaced with a full backup for the same point in time." http://www.acronis.com/support/documentation/ABR11.5/index.html#12733.h…
Just imagine that you did a full backup at that time. That's all. Any file that did not exist at that point in time is not included. If you know better wording please advise.
- Log in to post comments

Thank you elenal.
1) ahhh, well that explains a whole lot. I was seeing one result in one context and not in another. That is useful information, thank you.
2) adding --log...will do.
3) as a suggested improvement to ABR, it would be nice to add formal and/or improved PowerShell support into ABR especially since Server 2012 uses PowerShell extensively.
4) ok, but again, it's nice to have some working examples of pre/post commands in the docs and why you might use them.
5) thank you. It wasn't completely clear the first time I read it for some reason.
So it would appear, that in my case, it's probably best to have a scheduled task (or for Linux users and Cron job) that runs after all the backups and replication is done that would run acrocmd with convert full and then delete anything prior.
Additionally, as another feature request, it would be nice if the storage node supported the consoldate backups command as that does exactly what I want in a single command instead of two or more.
Thank you for your responses.
As for better wording, I could, but I'd probably want to rewrite a lot of the documentation from scratch and re-organize it a bit. What are you guys using for docs? MadCap? I used FrameMaker when I worked for Metwerks (now Free Semiconductor) in their Tech Pubs department. Loved it! wrote some code for outputting HTML Help and Apple Help from the docs. It was great.
- Log in to post comments