In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "how to back up files under Linux". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Data backup is the basis of disaster recovery, which refers to the process of copying all or part of the data set from the hard disk or array of the application host to other storage media in order to prevent data loss caused by system errors or system failures.
Backup server configuration rsync file vi / etc/rsyncd.conf# work in the specified user (may not be specified as 0) uid = 0gid = black hole. Error location use chroot = no# how many clients transmit files simultaneously max connections = 20 timeout timeout = 30 process number file pid file = / var/run/rsyncd.pid# log file lock file = / var/run/rsync.lock# log file log file = / var/log/rsyncd.log# module start # module name is random (can be multiple) [backup] # directories to be backed up path = / backup# There is an error ignoring the error ignore errors# indicates that the network permissions are writable (local control is really writable) read only = false# set IP here or let not let synchronization list = false# specify the allowed network segment hosts allow = 192.168.1.0 Universe reject the link address Click to indicate that there is no rejected link. Hosts deny = 0.0.0.0According to something not to move (default) # virtual user auth users = rsync_backup# virtual user password file secrets file = / etc/rsync.password II, backup server configuration virtual user password file [root@slave /] # echo "rsync_backup:123456" > / etc/rsync.password [root@slave /] # cat / etc/rsync.passwordrsync_backup:123456 # Note: rsync_backup is a virtual user 123456 lift the weight of the password file for the virtual user [root@inotify-slave /] # chmod / etc/rsync.password #, add security. 3. Configure the virtual user password on the main server and test [root@master ~] # echo "123456" > / etc/rsync.password [root@master ~] # cat / etc/rsync.password123456 # Note: just write the password here, remember. [root@master] # chmod 600 / etc/rsync.password [root@ ~] # ll / etc/rsync.password-rw- 1 root root 7 April 22 14:32 / etc/rsync.password [root@master ~] # echo "hello itstyle" > test.txt [root@master ~] # cat test.txthello itstyle [root@inotify ~] # rsync-avz test.txt rsync_backup@192.168.1.130::backup-- password-file=/etc/rsync.passwordsending incremental file Listtest.txtsent 82 bytes received 27 bytes 72.67 bytes/sectotal size is 13 speedup is 0.124, Write a script
Vi rsync_push.sh
#! / bin/bashrsync-az / home/tomcat8 rsync_backup@192.168.1.130::backup-- password-file=/etc/rsync.password "how to backup files under Linux" ends here. Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.