这些交换机能否通过FTP自动备份并推送到远程服务器?
我试图找到一种方法来自动创建交换机的定期备份,并通过FTP将其发送到远程服务器。我有兴趣了解是否有可能这样做的下列开关模式:
我找不到关于这些系统中任何一个的适当文档,以及如何备份系统,或者如果可能的话,自动化备份过程。
这些系统中的任何一个都有这种可能吗?是否可以自动创建这些交换机的备份并通过FTP将其推送到远程服务器?这是什么过程?是否有其他选择或解决办法来达到预期的结果?
发布于 2023-04-24 22:12:03
法律要求的通知:我为戴尔工作。
以下是如何在OS10:使用Ansible的https://grantcurell.github.io/Backup%20OS10%20Config%20with%20Ansible/上执行此操作
---
- name: Setting up localhost for saving config
hosts: localhost
gather_facts: yes
tasks:
- block:
- name: Generating backup folder name in localhost
set_fact:
target_folder: "{{ backup_folder }}/{{ ansible_date_time.iso8601 }}"
- name: Create config_backup folder
file:
path: "{{ target_folder }}"
state: directory
- debug:
msg: "Config files are to be backed up at {{target_folder}}"
delegate_to: localhost
run_once: True
- name: Backup os10 running configurations
hosts: os10
gather_facts: False
connection: network_cli
tasks:
- name: Fetch OS10 running configuration
dellos10_command:
commands: show running
register: sh_runn
- name: Save config to file
copy:
content: "{{ sh_runn.stdout | replace('\\n', '\n') }}"
dest: "{{hostvars.localhost.target_folder}}/{{inventory_hostname}}_os10_show_run"
delegate_to: localhost
- debug:
msg: "Config files are to be backed up at {{hostvars.localhost.target_folder}}"
run_once: trueall:
vars:
backup_folder: "/root/backup"
children:
os10:
hosts:
192.168.1.169:
ansible_become: 'yes'
ansible_become_method: enable
ansible_command_timeout: 120
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: dellemc.os10.os10
ansible_password: admin
ansible_user: admin
192.168.1.170:
ansible_become: 'yes'
ansible_become_method: enable
ansible_command_timeout: 120
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: dellemc.os10.os10
ansible_password: admin
ansible_user: admin我最近还向我们的产品组提交了一个请求,以便在用户进入配置模式时,可以在远程目标上创建备份。我们在这个过程中非常早,我没有要求一个高度优先考虑,所以非常粗略的估计(不要让我坚持)是在明年的某个时候。
现在几乎每个网络供应商都支持Ansible,所以这将是我的选择。通过cron作业启动剧本,并将其放在远程目标上的一个时间戳备份文件夹中。
戴尔收购了Force10所以Force10 =戴尔,除非你指的是真正老旧的开关,这些开关仍被称为Force10收购前的产品。
发布于 2023-04-24 20:14:49
https://networkengineering.stackexchange.com/questions/83001
复制相似问题