{"id":24131824,"url":"https://github.com/selcukcosan/f5-bigip_backup","last_synced_at":"2026-05-13T04:35:35.288Z","repository":{"id":245020101,"uuid":"816911633","full_name":"selcukcosan/f5-bigip_backup","owner":"selcukcosan","description":"Retrieve backup configs (UCS, Master Key, SCF, QKview, running config etc.) from F5 BIG-IP devices via Ansible","archived":false,"fork":false,"pushed_at":"2024-12-11T04:11:36.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-11T21:36:11.030Z","etag":null,"topics":["ansible","ansible-playbook","automation","backup","f5","f5-bigip","f5networks","master-key","qkview","scf","yaml","yaml-files"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/selcukcosan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-18T16:25:20.000Z","updated_at":"2024-12-11T04:12:05.000Z","dependencies_parsed_at":"2025-01-11T21:32:09.056Z","dependency_job_id":"6be9594b-a04c-42d3-b5c0-cefe79c69b64","html_url":"https://github.com/selcukcosan/f5-bigip_backup","commit_stats":null,"previous_names":["selcukcosan/f5-bigip_backup"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selcukcosan%2Ff5-bigip_backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selcukcosan%2Ff5-bigip_backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selcukcosan%2Ff5-bigip_backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selcukcosan%2Ff5-bigip_backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/selcukcosan","download_url":"https://codeload.github.com/selcukcosan/f5-bigip_backup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241333170,"owners_count":19945750,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-playbook","automation","backup","f5","f5-bigip","f5networks","master-key","qkview","scf","yaml","yaml-files"],"created_at":"2025-01-11T21:31:33.147Z","updated_at":"2026-05-13T04:35:35.260Z","avatar_url":"https://github.com/selcukcosan.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# f5-bigip_backup\n\nThis Ansible script takes backup of F5 BIG-IP devices in your inventory. The script uses the official f5networks.f5_modules Ansible modules on https://galaxy.ansible.com/ui/repo/published/f5networks/f5_modules/\n\nThe f5-bigip_backup.yaml script generates UCS,SCF, QKview, Master key, and running configuration files and retrieves these files from the F5 devices.\n\n- User Configuration set (UCS) Archieve File\n- Master Key\n- Single Configuration File (SCF)\n- QKView Support File\n- Running Configuration\n- Device Facts, Hardware and Software Information\n\nThe inventory yaml format is simple as below.\n\n\n```yml\n---\nall:\n  children:\n    all_f5:\n      hosts:\n        bigip1:\n          inventory_network_os: f5.bigip\n          inventory_host: 192.168.1.245\n          inventory_port: 443\n          inventory_user: admin\n          inventory_pass: password\n        bigip2:\n          inventory_network_os: f5.bigip\n          inventory_host: 192.168.1.246\n          inventory_port: 443\n          inventory_user: admin\n          inventory_pass: password\n        bigip3:\n          inventory_network_os: f5.bigip\n          inventory_host: 192.168.1.247\n          inventory_port: 443\n          inventory_user: admin\n          inventory_pass: password\n```\n\n\n\n\n## Prerequisite\nF5 Ansible Imperative Modules must be installed before running the script.\n```bash\nansible-galaxy collection install f5networks.f5_modules\n```\n\n## Usage:\n```bash\n\nANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -vvv --vault-password-file vault_pass.yaml -i inventory-vault.yaml f5-bigip_backup.yaml --extra-vars=\"bigip=bigip1\" --extra-vars=\"get_ucs=true\" --extra-vars=\"get_config=true\" --extra-vars=\"get_qkview=true\" --extra-vars=\"get_scf=true\" --extra-vars=\"get_facts=true\"\n```\n\n**_NOTE:_**  `output` folder must be created before running the script.\n\n## Files\n- f5-bigip_backup.yaml \u003e\u003e Ansible script file\n- vault_pass.yaml \u003e\u003e Inventory vault password information\n- inventory-vault.yaml \u003e\u003e Inventory vault file encrypted by \"Inventory vault password\"\n\n## Variables\n- `bigip` variable shows which F5 device will be connected.The value can be \"bigip1\", \"bigip2\" or \"all_f5\" as per the example inventory file above.\n- `get_ucs` variable shows whether to retrieve UCS backup file. If the value is \"true\", the Ansible script will take UCS backup and Master Key files and copy these files into \"output\" folder.\n- `get_config` variable shows whether to retrieve the running configuration of the F5 device. If the value is \"true\", the script will copy the running configuration into \"output\" folder.\n- `get_qkview` variable shows whether to retrieve the QKview support file from the device.  If the value is \"true\", the script will copy the QKview file into \"output\" folder.\n- `get_scf` variable shows whether to create SCF files into /var/local/scf/ folder. If the value is \"true\", the script will copy .scf and .scf.tar files into \"output\" folder.\n- `get_facts` variable shows whether to retrieve F5 BIG-IP Facts information from the device.\n\n## Task Explanations in f5-bigip_backup.yaml\n- name: 01- Create a new UCS and Download \u003e\u003e bigip_ucs_fetch module creates UCS file on the remote F5 BIG-Ip Device and copy the ucs file into dest: \"./output/{{ backup_file_name }}.ucs\"\n- name: 02- Remove the UCS from the device \u003e\u003e bigip_ucs module deletes the file created in Task 01\n- name: 03- Get running config on remote device \u0026\u0026 - name: 04- Copy output of running config to file \u003e\u003e bigip_command module gets the running configuration and copy it into dest=./output/{{ backup_file_name }}.txt\n- name: 05- Get master key on remote device \u0026\u0026 - name: 06- Copy master key to file \u003e\u003e bigip_command module gets the Master key file from F5 BIG-IP and copy it into dest=./output/{{ backup_file_name }}.key\n- name: 07- Writing SCF Files  \u003e\u003e Takes scf files backup into /var/local/scf/ folder.\n- name: 08-01 and 08-02 Copying SCF Files to local system. \n- name: 09- Collect all BIG-IP information \u0026\u0026 - name: 10- Copy all BIG-IP information \u003e\u003e bigip_device_info retrieves the F5 BIG-IP Facts information and copy it into dest=./output/{{ backup_file_name }}.info\n- name: 11- BIG-IP Hostname information \u003e\u003e This task it just writes the qkview file name information\n- name: 12- Fetch QKView BIG-IP information \u003e\u003e bigip_qkview module creates QKview support file on the remote F5 BIG-IP device and copy it into dest: \"./output/{{ backup_file_name }}.qkview\"\n\n## output Folder Example Files\n- bigip1-2024-06-18-22-37-54.ucs\n- bigip1-2024-06-18-22-37-54.txt\n- bigip1-2024-06-18-22-37-54.key\n- bigip1-2024-06-18-22-37-54.info\n- bigip1-2024-06-18-22-37-54.scf\n- bigip1-2024-06-18-22-37-54.scf.tar\n- bigip1-2024-06-18-22-37-54.qkview\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselcukcosan%2Ff5-bigip_backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fselcukcosan%2Ff5-bigip_backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselcukcosan%2Ff5-bigip_backup/lists"}