Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
systems:linux_maintenance_scripts [2018/05/01 14:52] smayr [Backup Databases] |
systems:linux_maintenance_scripts [2018/05/01 15:07] (current) smayr [RSync] |
||
---|---|---|---|
Line 1: | Line 1: | ||
== Linux Maintenance Scripts == | == Linux Maintenance Scripts == | ||
+ | == Services == | ||
+ | ==== BIND/DNS ==== | ||
+ | '' | ||
+ | <code bash> | ||
+ | #!/bin/bash | ||
+ | ## script: ./ | ||
+ | |||
+ | #/ | ||
+ | #/ | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | ==== DHCP ==== | ||
+ | '' | ||
+ | <code bash> | ||
+ | #!/bin/bash | ||
+ | ## script: ./ | ||
+ | |||
+ | #service isc-dhcp-server stop | ||
+ | #service isc-dhcp-server start | ||
+ | service isc-dhcp-server restart | ||
+ | |||
+ | # Check status | ||
+ | ps aux | grep dhcpd | ||
+ | </ | ||
+ | |||
+ | ==== Windows Server Mapping ==== | ||
+ | '' | ||
+ | <code bash> | ||
+ | #!/bin/bash | ||
+ | ## script: ./ | ||
+ | ## Mount and map Windows backup server (for backup purposes) | ||
+ | mount -t cifs -o username=backuponly, | ||
+ | </ | ||
+ | |||
+ | ==== RSync ==== | ||
+ | '' | ||
+ | <code bash> | ||
+ | #!/bin/bash | ||
+ | |||
+ | #rsync --verbose | ||
+ | # --recursive --times --perms --links --delete \ | ||
+ | # --exclude " | ||
+ | # 192.168.0.31: | ||
+ | |||
+ | # Website | ||
+ | rsync --archive --verbose --progress --stats --rsh=/ | ||
+ | --links --delete --exclude=stats 192.168.0.31:: | ||
+ | |||
+ | # Databases | ||
+ | rsync --archive --verbose --progress --stats --rsh=/ | ||
+ | --links --delete 192.168.0.31:: | ||
+ | |||
+ | # Root user home | ||
+ | rsync --archive --verbose --progress --stats --rsh=/ | ||
+ | --links --delete 192.168.0.31:: | ||
+ | |||
+ | # Subserver Repositories | ||
+ | rsync --archive --verbose --progress --stats --rsh=/ | ||
+ | --links --delete 192.168.0.31:: | ||
+ | </ | ||
+ | |||
+ | == Anti-spam / Anti-crack == | ||
+ | Run this script to scan the website and see signs of spamming or cracking: '' | ||
+ | <code bash> | ||
+ | #!/bin/bash | ||
+ | ## script: scan-website.sh | ||
+ | ## | ||
+ | |||
+ | echo "Scan Website for vulnerabilities" | ||
+ | |||
+ | cd /var/www | ||
+ | find . -name " | ||
+ | find . -name " | ||
+ | find . -name " | ||
+ | find . -name " | ||
+ | find . -name " | ||
+ | find . -name " | ||
+ | less / | ||
+ | </ | ||
== Mail Spool Maintenance == | == Mail Spool Maintenance == | ||