1、备份服务器地址10.55.1.100,OS位RHEL 6.4
2、yum本地仓库安装tftp服务
# yum repolist
Loaded plugins: aliases, changelog, downloadonly, kabi, presto, product-id, refresh-packagekit, security,
: subscription-manager, tmprepo, verify, versionlock
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Loading support for Red Hat kernel ABI
localrepo | 3.9 kB 00:00 ...
localrepo/primary_db | 3.1 MB 00:00 ...
repo id repo name status
localrepo localrepo 3,648
repolist: 3,648
[root@wuftp yum.repos.d]# yum info tftp
Loaded plugins: aliases, changelog, downloadonly, kabi, presto, product-id, refresh-packagekit, security,
: subscription-manager, tmprepo, verify, versionlock
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Loading support for Red Hat kernel ABI
Available Packages
Name : tftp
Arch : x86_64
Version : 0.49
Release : 7.el6
Size : 32 k
Repo : localrepo
Summary : The client for the Trivial File Transfer Protocol (TFTP)
URL : http://www.kernel.org/pub/software/network/tftp/
License : BSD
Description : The Trivial File Transfer Protocol (TFTP) is normally used only for
: booting diskless workstations. The tftp package provides the user
: interface for TFTP, which allows users to transfer files to and from a
: remote machine. This program and TFTP provide very little security,
: and should not be enabled unless it is expressly needed.
yum -y install tftp xinetd tftp-server
3、配置tftp server
关闭selinux和iptables
~]# vim /etc/xinetd.d/tftp
# default: off
# description: The tftp server serves files using the trivial file transfer \
# protocol. The tftp protocol is often used to boot diskless \
# workstations, download configuration files to network-aware printers, \
# and to start the installation process for some operating systems.
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /networkbackup -c 设定TFTP传输的文件保存的路径 -c锁定目录
disable = no disable修改为no进行开启
per_source = 11
cps = 100 2
flags = IPv4
}
chmod 777 -R /networkbackup 给备份文件夹授予权限
重启xientd.d,是进程是tftp服务的父进程
[root@wuftp /]# service xinetd restart
Stopping xinetd: [FAILED]
Starting xinetd: [ OK ]
查看tftp是否启动正常
netstat -a | grep tftp
udp 0 0 *:tftp *:*
添加开机自启动
chkconfig --add tftp
4、cisco设备进行tftp备份
User Access Verification
Username:
Username:
Username: 1080054
Password:
Aging1#copy
Aging1#copy ru
Aging1#copy running-config tf
Aging1#copy running-config tftp:
Address or name of remote host []? 10.55.1.100
Destination filename [aging1-confg]?
!!!
8850 bytes copied in 2.184 secs (4052 bytes/sec)
5、备份完成
[root@wuftp networkbackup]# ll
total 412
-rw-rw-rw- 1 nobody nobody 7742 Jan 19 12:34 172.16.1.2-tfn-confg
-rw-rw-rw- 1 nobody nobody 8065 Jan 19 12:35 172.16.1.3-dyx-confg
-rw-rw-rw- 1 nobody nobody 8850 Jan 19 11:20 aging1-confg
-rw-rw-rw- 1 nobody nobody 8781 Jan 19 11:20 aging2-confg
-rw-rw-rw- 1 nobody nobody 8894 Jan 19 11:19 aging3-confg
-rw-rw-rw- 1 nobody nobody 1663 Jan 19 11:21 ap-warehouse2-confg
-rw-rw-rw- 1 nobody nobody 1647 Jan 19 11:22 ap-warehouse4-confg
-rw-rw-rw- 1 nobody nobody 8672 Jan 19 11:19 caigou-confg
-rw-rw-rw- 1 nobody nobody 4725 Jan 19 11:18 caiwu-confg
-rw-rw-rw- 1 nobody nobody 5410 Jan 19 11:16 chanxiao-confg
-rw-rw-rw- 1 nobody nobody 13745 Jan 19 12:36 core3750-confg
-rw-rw-rw- 1 nobody nobody 38573 Jan 19 12:08 cptw_4507r_lcm1-confg
-rw-rw-rw- 1 nobody nobody 26937 Jan 19 11:24 cptw_4507r_lcm2-confg
-rw-rw-rw- 1 nobody nobody 50960 Jan 19 11:13 cptw_4507r_lcm3-confg
-rw-rw-rw- 1 nobody nobody 8992 Jan 19 11:16 cr1-confg
-rw-rw-rw- 1 nobody nobody 5217 Jan 19 11:15 cr2-confg
-rw-rw-rw- 1 nobody nobody 3426 Jan 19 11:14 cr3-confg
-rw-rw-rw- 1 nobody nobody 5158 Jan 19 11:14 cr4-confg
-rw-rw-rw- 1 nobody nobody 1789 Jan 19 12:18 dmz-confg
-rw-rw-rw- 1 nobody nobody 4565 Jan 19 12:17 dongli-confg
-rw-rw-rw- 1 nobody nobody 3020 Jan 19 12:17 gaswitch-confg
-rw-r--r-- 1 root root 5224 Jan 19 12:40 GAYBSWITCH-confg
-rw-rw-rw- 1 nobody nobody 4293 Jan 19 12:37 gbyg-confg
-rw-rw-rw- 1 nobody nobody 3766 Jan 19 11:14 hp-e-confg
-rw-rw-rw- 1 nobody nobody 4462 Jan 19 12:07 lcm1-fa-confg
-rw-rw-rw- 1 nobody nobody 5048 Jan 19 12:07 lcm1-oa-confg
-rw-rw-rw- 1 nobody nobody 2860 Jan 19 12:06 lcm1-rac-3750-confg
-rw-rw-rw- 1 nobody nobody 2877 Jan 19 11:12 lcm3jiexi24k-confg
-rw-rw-rw- 1 nobody nobody 13519 Jan 19 11:28 p52-confg
-rw-rw-rw- 1 nobody nobody 1637 Jan 19 11:22 pc-warehouse1-confg
-rw-rw-rw- 1 nobody nobody 1495 Jan 19 11:22 pc-warehouse6-confg
-rw-rw-rw- 1 nobody nobody 5119 Jan 19 11:27 phonerouter-confg
-rw-rw-rw- 1 nobody nobody 1961 Jan 19 11:23 pur-confg
-rw-rw-rw- 1 nobody nobody 4960 Jan 19 11:11 system1-confg
-rw-rw-rw- 1 nobody nobody 9560 Jan 19 11:10 system2-confg
-rw-rw-rw- 1 nobody nobody 1899 Jan 19 11:23 vipap-confg
-rw-rw-rw- 1 nobody nobody 6159 Jan 19 11:09 warehouse-confg
-rw-rw-rw- 1 nobody nobody 3098 Jan 19 11:09 xuniji-confg
-rw-rw-rw- 1 nobody nobody 9190 Jan 19 11:08 yewu-confg
-rw-rw-rw- 1 nobody nobody 2990 Jan 19 12:19 yiwushi-1-confg
-rw-rw-rw- 1 nobody nobody 3691 Jan 19 12:34 yiwushi-2-confg
-rw-rw-rw- 1 nobody nobody 3682 Jan 19 11:26 yiwushi-3-confg