Nollställ lagersaldo
" | Handbok SystemQ affärssystem |
Beskrivning hur rsyncinstalleras samt hur backup konfigureras
| ||||||||||||||||||
Installation/nerladdning av rsync | yum install rsync | |||||||||||||||||
Aktivering av rsync-demon | Create an rsyncd.service fedora 16
Create configuration for rsyncd server. - mkdir /etc/rsyncd - touch /etc/rsyncd.motd - touch /etc/rsyncd.secrets - edit /etc/rsyncd.conf pid file=/var/run/rsyncd.pid port=873
address=
uid=root
gid=root
use chroot=yes
read only=no
# limit access to from allowed hosts only
hosts allow=
hosts deny=*
motd file=/etc/rsyncd/rsyncd.motd
log format=%t%a%m%f%b
log file=/var/log/rsyncd.log
timeout=300
[BACKUP]
path=/disk4/backup
list=yes
#secrets file=/etc/rsysncd/rsyncd.secrets
comment=
In the directory /lib/systemd/system create two files.
- rsyncd@.service
[Unit]
Description=rsyncd Rsync Daemon
After=syslog.target network.target
[Service]
ExecStart=/usr/bin/rsync --config=/etc/rsyncd/rsyncd.conf --daemon
StandardInput=socket
- rsyncd.socket
[Unit]
Description=rsyncd Service Sockets
[Socket]
ListenStream=873
Accept=yes
[Install]
WantedBy=sockets.target
Reload systemd daemon, enable and start the service.
- systemctl --system daemon-reload
- systemctl enable rsyncd.socket
- systemctl start rsyncd.socket
echo "Startar Rsync: Databas ML-Fors " `date` > /backup/ml_rsync.log
rsync -auvz --password-file="/root/bor" 10.200.52.51::BACKUP/ /backup/ml/
echo "Rsync klar: ML-FORS " `date` >> /backup/ml_rsync.log
echo "-----------------------------------------------" >> /backup/ml_rsync.log
cat /backup/ml_rsync.log >> /backup/rsync.log
exit
|