Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Backup database for mediacenter_webservice
- mysqldump --user=<your_username> --password="<your_password>" <your_database> | gzip > <your_serverpath>/$(date +%F)_<your_filename>.sql.gz
- #Delete archives older than 210 days
- find <your_serverpath> -type f -mtime +210 -exec rm {} +
- #Delete zip (downloads) older than 10 days
- find <your_serverpath>/*.zip -mtime +10 -exec rm {} \;
- #Delete tmp files older than 10 days
- find <your_serverpath>/*.* -mtime +10 -exec rm {} \;
- #chmod folder and files
- find <your_serverpath> -type d -exec chmod 755 {} \;
- find <your_serverpath> -type f -exec chmod 644 {} \;
- #Antivirus in server
- /malware.py --minscore 10 > log.txt
- clamscan -r --infected log.txt
- #Compress and uncompress files
- tar -cvzf backup.tar.gz *
- tar -xvf backup.tar.gz
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement