Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of backup Files in Linux system

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

The content of this article mainly focuses on the example analysis of Linux system backup files. The content of the article is clear and clear. It is very suitable for beginners to learn and is worth reading. Interested friends can follow the editor to read together. I hope you can get something through this article!

Backup server configuration rsync file vi / etc/rsyncd.conf

# the specified user in work (may not be specified as 0) uid = 0 gid = 0 # is equivalent to a black hole. Error location use chroot = no # how many clients simultaneously transfer files max connections = 200 # timeout timeout = 300 # 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 starts # module name is random (can be multiple) [backup] # directories to be backed up path = / backup # indicates error ignoring error ignore errors # indicates that network permissions are writable (local control is really writable) read only = false # here set IP or let not synchronize list = false # specify allowed network segment hosts allow = 192.168.1.0 Universe 24 # reject the address of the link Click to indicate that there is no rejected link. Hosts deny = 0.0.0.0 hosts deny 32 # Don't move (default) # Virtual user auth users = rsync_backup # password file for virtual user secrets file = / etc/rsync.password II, backup server configuration password file for virtual user

[root@slave /] # echo "rsync_backup:123456" > / etc/rsync.password [root@slave /] # cat / etc/rsync.password rsync_backup:123456 # Note: rsync_backup is a virtual user, and 123456 raises the weight of the password file for this virtual user's password [root@inotify-slave /] # chmod / etc/rsync.password # to increase security. 3. Configure the virtual user password on the main server and test it.

[root@master ~] # echo "123456" > / etc/rsync.password [root@master ~] # cat / etc/rsync.password 123456 # Note: just write the password here, remember. [root@master ~] # chmod # 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.txt hello itstyle [root@inotify ~] # rsync-avz test.txt rsync_backup@192.168.1.130::backup-password-file=/etc/rsync.password sending Incremental file list test.txt sent 82 bytes received 27 bytes 72.67 bytes/sec total size is 13 speedup is 0.124, Write a script

Vi rsync_push.sh

#! / bin/bash rsync-az / home/tomcat8 rsync_backup@192.168.1.130::backup-password-file=/etc/rsync.password Thank you for your reading. I believe you have some understanding of "sample Analysis of Linux system backup Files". Go ahead and practice it. If you want to know more about it, you can follow the website! The editor will continue to bring you better articles!

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report