tabernarious / f5-automated-backup-iapp

F5 iApp for automated backups to the local device and to network locations.
35 stars 26 forks source link

SCF problems #18

Closed gedeon007 closed 5 years ago

gedeon007 commented 5 years ago

Hi,

Still, this iApp is really cool :)

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

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

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

tabernarious commented 5 years ago

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

tabernarious commented 5 years ago

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 :(

gedeon007 commented 5 years ago

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

tabernarious commented 5 years ago

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.

gedeon007 commented 5 years ago

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.

tabernarious commented 5 years ago

@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.

tabernarious commented 5 years ago

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.

gedeon007 commented 5 years ago

@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.

tabernarious commented 5 years ago

@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.

gedeon007 commented 5 years ago

@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).

tabernarious commented 5 years ago

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.