In the Linuxp system, the itables command can perform a backup or restore for us, but many users may not be familiar with it. The following small series will share the method for everyone.
as follows:
1, iptables configuration file location: /etc /sysconfig /iptables
master: i.e. the business running the machine; backup Machine: When the main control machine fails, switch to the backup machine
--Operation on the main controller -------------------
2, create a directory:
mkdir -p /bak/iptables/
mkdir /root/script/
3, in the /root/script/directory Create a script:
vi backup.sh
\\cp /etc/sysconfig/iptables /bak/iptables/iptables_$(date +%Y%m%d%H)
4, custom automatic tasks:
crontab -e
*/10 * * * * /usr/sbin/ntpdate 210.72.145.44
10 * * * * Sh /root/script/backup.sh
--Operating on the backup machine ---------------------
5, Create directory:
mkdir -p /bak/iptables/{lt,yd} #lt directory to put backup of Unicom jump, yd directory put mobile jump backup
mkdir /root/Script/
6, in the /root/script/directory Create a script:
vi scp_lt.sh
#!/usr/bin/expect -f
set password gst
spawn scp -P 22 root @202.105.135.52:/etc/sysconfig/iptables /bak/iptables/lt/iptables
set timeout 300
expect "[email protected]'s password:"
set timeout 300
send "$password\
"
set timeout 300
send "exit\
"
expect Eof Previous12Next page Total 2 pages
awk is a text processing tool in Linux, similar to the shell programming language, has its own langu
Installing Vagrant on Linux system is prone to various problems, for example, some people do not kno
Most of the current notebooks are already dual graphics cards, discrete graphics and integrated grap
In Linux systems, the source command usually uses “. & rdquo; Instead, is a point command, and
How Linux uses the kill command to force a process to terminate
Linux system iPtraf installation and use method
Linux system management disk and file method
Linux using shell scripts to measure high-speed network traffic
How to install uGet 2 on Ubuntu
Solution with fstab file error causing Linux to fail to start
After the Linux boot, the terminal prompts -bash-2.05b$ What should I do?
How Linux System Supervisor manages processes
How to use the command to synchronize the clock under Linux
How to install boost library in Linux system
Win10 system right-click menu is not new how to fix
Detailed steps for Windows 7 to adjust partitioning features
How to open Super Administrator
Clean the disk regularly to keep the Windows 8 system clean
How does win10 connect to remote desktop? Win10 two ways to open remote desktop
Win XP default settings modify Raiders
In the Win7 environment, the command syntax for deleting arbitrary files using CMD is
What can I do if the WP recovery tool cannot be installed under Win10?
Computer housekeeper Win10 detects how the user account type does not support how to do
XP skills serial group strategy one sentence secret skills broadcast