CodeShare
Have some code. Share some code.
cancel
Showing results for 
Search instead for 
Did you mean: 
MAG_114141
Nimbostratus
Nimbostratus

Problem this snippet solves:

On TMOS 12.1 smbclient do not exist any more. But mount.cifs still exist.

In attachment you can find modified original iApp by Thomas Schockaert which use mount.cifs.

Code :

70074

Tested this on version:

12.0
Comments
Cirrus
Cirrus
Cirrus

Thank you for this, since F5 removed smbclient from the new TMOS versions the original iApp was broken. But now with cifs everything is working again.

 

Jocelyn_Briere_
Nimbostratus
Nimbostratus

Great work to adapt it for V12, thanks. Exactly what I was looking for.

 

A_Sara_230146
Nimbostratus
Nimbostratus

I am getting following error on our LTM 12.1.0 image, earlier we were using 11.4 with f5backups2.1 script and it was working fine.

 

Script (/Common/) generated this Tcl error: (script did not successfully complete: (Retrying with upper case share name mount error(6): No such device or address Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) while executing "exec $scriptfile" line:17))

 

Need your help to fix this issue to continue with automatic backup iApp.

 

MAG_114141
Nimbostratus
Nimbostratus

Hi, A_Sara

1. please check letter case of msshare

2. iApp don't work after upgrade or you try use it on clean 12.1.0 install? 3. Is your share has spaces on it?

4. Do you use dns name of server or it ip address? If DNS is nslookup from cli resolve this name?

5. Check leading or tailed spaces of msshare?

6. Try to change on iApp template

mount -t cifs //\${server}\${msshare}
to

mount -t cifs \'//\${server}\${msshare}\'

p.s. You can contact with me directly by mag@comptek.ru...

A_Sara_230146
Nimbostratus
Nimbostratus

Hi Mag,

 

I verified all settings and still failing to take the automatic backup, I responded already with screenshot of the configuration and error message which I am getting. Requesting you to help us here to fix it.

 

Dev_56330
Cirrus
Cirrus

I really appreciate the share though on my initial attempt to import and deploy I receive the error "Error parsing template:can't eval proc: "script::run" field not present: "hostname" while executing "tmsh::get_field_value [lindex [tmsh::get_config sys global-settings] 0] hostname" (procedure "script::run" line 2) invoked from within "script::run" line:1." Just curious if anyone knew of a quick solution off the top of their head. Running 12.1

 

Tom_Nelson
Nimbostratus
Nimbostratus

I am using this script via FTP, everything works great except the local deletion of the UCS file. I get a backlog of *.ucs files in /var/local/ucs. This does not happen every day, it seems to be random. The output of scriptd.out all appears to be normal.

 

Travis_Kamish_2
Nimbostratus
Nimbostratus

Hello I am trying to set this up but when I try to create the application to tie this and start the backup I get the following error. "script did not successfully complete: (The connection to mcpd has been lost, try again. while executing "tmsh::cd .." line:4)"

 

Patrick1507_332
Nimbostratus
Nimbostratus

Same issue! Could you please provide an Update.

 

BIG-IP v12.1.1 (Build 2.0.204)

 

Travis_Kamish_2
Nimbostratus
Nimbostratus

I had HSL running and had to remove that to get this to work. There is a bug with this backup and HSL.

 

aaperson_255899
Nimbostratus
Nimbostratus

Thank you for pointing out that TMOS 12.1 is missing SMB. Been trying to figure out why I couldn't get the original to work. Also getting error. "script did not successfully complete: (The connection to mcpd has been lost, try again. while executing "tmsh::cd .." line:4)"

 

amjadb_4287
Nimbostratus
Nimbostratus

Hi All,

 

We recently installed the HF2 for 12.1.2 and the iApp stopped placing the backup file into the remote server. It is saying "Permission denied"...We are using SCP and I suspect its related to the encryption key. Any suggestions out here?

 

Seven11
Nimbostratus
Nimbostratus

Hi All,

 

i want to use the iapp with scp and private key. Which is the correct format to enter the key in the gui? TMOS 13.0.0 HF3.

 

Thanks!

 

This is now available on GitHub! Please look here for the latest version, and submit any bugs or questions as an "Issue" on GitHub:

 

https://github.com/tabernarious/f5-automated-backup-iapp

 

As a BACKUP, look in the DevCentral CodeShare. This MAY NOT HAVE THE LATEST VERSION:

 

https://devcentral.f5.com/s/articles/f5-iapp-automated-backup-1114

 

I needed to troubleshoot an issue and ended up rolling in many of the proposed and posted fixes into a new iApp.

 

 iApp VERSIONS (From what I gathered perusing DevCentral)
 ~v2.0  - 20140312 - Initially posted releases (v11.4.0-11.6.x? compatibility). (Developed/posted by Thomas Schockaert)
 v2.1.1 - 20160916 - Retooled SMB upload from smbclient to "mount -t cifs" (v12.1+ compatibility). (Developed/posted by MAG)
 v2.2.1 - 20171214 - Allowed multiple instances of iApp by leveraging $tmsh::app_name to create unique object names. (Developed by Daniel Tavernier/tabernarious)
 v2.2.2 - 20171214 - Added "/" to "mount -t cifs" command and clarified/expanded help for SMB (CIFS) Destination Parameters. (Developed by Daniel Tavernier/tabernarious)
 v2.2.3 - 20171214 - Set many fields to "required" and set reasonable default values to prevent loading/configuration errors. Expanded help regarding private keys. (Developed by Daniel Tavernier/tabernarious)
 v2.2.4 - 20171214 - Added fix to force FTP to use binary upload. (Copied code posted by Roy van Dongen, posted by Daniel Tavernier/tabernarious)
 v2.2.4a - 20171215 - Added items to FUTURE list.
 v2.2.5 - 20171228 - Added notes about special characters in passwords. Added Deployment Information and ConfigSync sections. (Developed by Daniel Tavernier/tabernarious)
 v2.2.5a - 20180117 - Added items to FUTURE list.
 v2.2.5b4 - 20180118 - Moved encrypted values for SMB/CIFS to shell script which eliminates ConfigSync issues. Fixed long-password issue by using "-A" with openssl so that base64 encoded strings are written and read as a single line. (Developed by Daniel Tavernier/tabernarious)
 v2.2.5b4+ - 20180118 - Refining changes to SMB/CIFS and replicating to other remote copy types. (Developed by Daniel Tavernier/tabernarious)
 v3.0.0 - 20180124 - (Developed by Daniel Tavernier/tabernarious)
                   - Eliminated ConfigSync issues and removed ConfigSync notes section. (Encrypted values now in $script instead of local file.)
                   - Passwords now have no length limits. (Using "-A" with openssl which reads/writes base64 encoded strings as a single line.)
                   - Added $script error checking for all remote backup types. (Using 'catch' to prevent tcl errors when $script aborts.)
                   - Backup files are cleaned up after $script error due to new error checking.
                   - Added logging. (Run logs sent to '/var/log/ltm' via logger command which is compatible with BIG-IP Remote Logging configuration (syslog). Run logs AND errors sent to '/var/tmp/scriptd.out'. Errors may include plain-text passwords which should not be in /var/log/ltm or syslog.)
                   - Added custom cipher option for SCP.
                   - Added StrictHostKeyChecking=no option.
                   - Combined SCP and SFTP because they are both using SCP to perform the remote copy.
 v3.1.0 - 20180201 - (Developed by Daniel Tavernier/tabernarious)
                   - Removed "app-service none" from iCall objects. The iCall objects are now created as part of the Application Service (iApp) and are properly cleaned up if the iApp is redeployed or deleted.
                   - Reasonably tested on 11.5.4 HF2 (SMB worked fine using "mount -t cifs") and altered requires-bigip-version-min to match.
                   - Fixing error regarding "script did not successfully complete: (can't read "::destination_parameters__protocol_enable": no such variable" by encompassing most of the "implementation" in a block that first checks $::backup_schedule__frequency_select for "Disable".
                   - Added default value to "filename format".
                   - Changed UCS default value for $backup_file_name_extension to ".ucs" and added $fname_noext.
                   - Removed old SFTP sections and references (now handled through SCP/SFTP).
                   - Adjusted logging: added "sleep 1" to ensure proper logging; added $backup_directory to log message.
                   - Adjusted some help messages.
AN
Nimbostratus
Nimbostratus

same issue iAPP doesn't work... Has anyone had success working with 12.1.1?

 

AN, What issues are you having? Can you post screenshots or error messages or a more detailed description? Also, have you tried the latest version of the iApp I posted just above your comment? Version 3.0.0.

 

Check out GitHub for the latest version of the F5 Automated Backup iApp, and submit any bugs or questions as an "Issue" on GitHub:

 

https://github.com/tabernarious/f5-automated-backup-iapp

Version history
Last update:
‎21-Aug-2016 04:56
Updated by:
Contributors