tabernarious/f5-automated-backup-iapp

SCF problems

Closed this issue · 11 comments

Hi,

Still, this iApp is really cool :)

When I try to create an SCF backup, I face the following issues:

  • When I switch to SCF format, passphrase text box (and also the drop down list to decide whether archive encryption is needed) disappears from the GUI and I cannot save Application Service (error message is shown about missing parameter: "script did not successfully complete: (can't read "::backup_type__backup_passphrase_select": no such variable
    while executing...)"

Workaround: create and save the application as UCS file format with passphrase box filled, then reconfigure it by changing the file format to SCF

  • When I try to create an SCF backup with SMB/CIFS location, the archive cannot be copied to the remote location (and therefore I guess also pruning is not working). When I check /var/log/ltm, I can see that scf file has been created, "REMOTE COPY and PRUNING (SMB/CIFS) STARTING", but right after it "REMOTE COPY (SMB/CIFS) FAILED (see /var/tmp/scriptd.out for errors)". When I check this file, I can see a similar error message "REMOTE COPY (SMB/CIFS) FAILED (check for errors above)", but there is nothing more above.

Using template version 3.1.4 and TMOS version 13.1.0.8 (Build 0.0.3).

I have fixed this issue which will be released in v3.1.5 (this week).

The reason this was broken is because I started to fix it a while back then realized that v12 introduced different behavior (required "no-passphrase" if not using "passphrase") and ran out of time...and sort of forgot about it :(

Oh, You're great!!! Thanks a lot! :)

I just uploaded v3.1.5. Let me know when you get a chance to test it. I'll leave this open for a bit.

I just managed to test it.

The first problem is now resolved (I can decide whether I want to use passphrase) but nothing has changed with the second one.

I was investigating a little bit in the following section:
elseif { $::destination_parameters__protocol_enable eq "Remotely via SMB/CIFS" } {

I checked line 313 in the template and I noticed that it contains cd /var/local/ucs, which means that even if script creates the SCF file (as in my case) it has no chance to copy it anywhere as script uses /var/local/ucs directory statically.

Additionally I checked line 336 and noticed that string map is set to do this replacement (amongst others):
BACKUPDIRECTORY $backup_directory

So in line 313 I replaced this:
cd /var/local/ucs
with this:
cd $(echo "BACKUPDIRECTORY")

It seems to be working (at least an SCF file with the proper filename and extension appeared on my remote share AND /var/tmp/scriptd.out and /var/log/ltm looks like as expected).

Maybe this little change is also needed in other branches of the if statement (SCP/SFTP, FTP), but I have no chance to test these storing methods.

Please verify my fix and release v3.1.6 if you agree.

@gedeon007 You were right on target. Somehow I glossed over the second part of your issue. I found a number of issues dealing with SCF files, mainly that the accompanying tar files were not being copied! I have fixed this as well and just need to do some general testing to be sure I didn't break anything else. I'll have a new version out 11/14 or 11/15.

On a side note, how much do you actually use SCF files? I am considering dropping support for SCFs and focusing solely on UCS archives.

@tabernarious cool, thanks a lot, I'm looking forward to have the new version :)

Regarding to your side note, I'm maintaining a pair of vCMP enabled devices and I would like to generate UCS files and SCF files as well.

The latest version of VIPRION training states that "Support recommends creating a SCF on the host and each guest and save in the event of an RMA recovery.", so based on this I think it is good to have the option for SCF also.

@gedeon007 I have uploaded v3.1.6. Please let me know and close this out if it's fixed to your satisfaction :)

This should be MUCH better. I can't believe I missed so many SCF-related issues. It appears that I previously tested very little surrounding SCF (and tar file) uploads.

@tabernarious It works like a charm! :) Thank you for your help!

Only one more cosmetic stuff... in Presentation section, under texts we have backup_type.backup_passphrase_select with value "Use a passphrase to encrypt the UCS archive:", but when using SCF as the type of backup, this label can confuse somebody (could be better to change the label to "Use a passphrase to encrypt the archive:" or make it backup type dependent).

You're very welcome. Thanks for finding that cosmetic issue--I like it to be clean. I updated the text and a few other cosmetic things (field sizes) and re-uploaded as v3.1.6. I'll go ahead an close this but feel free to reopen if needed.