wput
wput --limit-rate=3000K --timestamping --output-file=/var/log/wput.log /var/backup/site/ ftp://логины:пароли@сервера/home/odessa/infoodessa.ru/docs/tmp/
#!/bin/sh
cd /var/www
DATE=`date +"%Y-%m-%d"`
LIST=`ls | grep -E ".*\.\w{1,4}"`
(echo "Subject: Бэкап 2 server начат"; cat /var/log/wput.log;) | /usr/sbin/sendmail ТУТ_ТВОЙ@mail.ru
test ! -d /var/backup/site/`date +%Y`/`date +%m` && { mkdir -p /var/backup/site/`date +%Y`/`date +%m` ; }
for ELEMENT in $LIST
do
tar -zcvpf /var/backup/site/`date +%Y`/`date +%m`/$ELEMENT-$DATE.tar.gz /var/www/$ELEMENT/web --exclude=backup --exclude=managed_cache --exclude=stats --exclude=resize_cache >> /dev/nool 2> /var/log/file_backup.err
done
RewriteCond %{REQUEST_URI} !^ru/home\-ru/$ [NC]
RewriteCond %{QUERY_STRING} (^|&)s\=some_text($|&)
RewriteCond %{QUERY_STRING} (^|&)lang\=ru($|&)
RewriteCond %{QUERY_STRING} (^|&)NoBots\=83AheSajkmPTJdOtGapEe2KqFgyGoBs75E3X5DfFGC0%3D%7C8997a03685d7552cbe5cb5a867ebfdf5($|&)
RewriteRule ^.*/$ /\?s=some_text&lang=ru&NoBots=83AheSajkmPTJdOtGapEe2KqFgyGoBs75E3X5DfFGC0%3D%7C8997a03685d7552cbe5cb5a867ebfdf5 [L,R=301]
!-
отрицание RewriteCond %{REQUEST_URI} !^ru/home\-ru/$
RewriteRule ^(.*)$ /$1\?%{QUERY_STRING}
tail -f /var/log/messages | grep "че вам нужно"
- и получаете живой лог только по этой строке tail -f /var/log/messages | grep "че вам нужно" > 111.txt
mysql -uroot -pтут_парол << EOF
Тут что нужно записать
EOF
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{HTTP_HOST} !^www\.(.*) [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{SERVER_PORT} ^443$
RewriteCond %{HTTP_HOST} !^www\.(.*) [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
# 301 --- ex.com/maker.php?id=1 => ex.com/maker/1
RewriteCond %{QUERY_STRING} (^|&)id\=1($|&)
RewriteRule ^ex\.com/maker\.php$ http://ex.com/maker/1? [L,R=301]
# 301 --- ex.com/condition.php?id=1 => ex.com/condition/1
RewriteCond %{QUERY_STRING} (^|&)id\=1($|&)
RewriteRule ^ex\.com/condition\.php$ http://ex.com/condition/1? [L,R=301]
# 301 --- ex.com/expample.php => ex.com/expample
RewriteRule ^ex\.com/expample\.php$ http://ex.com/expample? [L,R=301]
RewriteRule ^link/(.*)$ link.php?link=$1 [PT,L,QSA]
RewriteRule ^link/(.*)$ link.php\?link=$1 [PT,L,QSA]
RewriteCond %{QUERY_STRING} (^|&)link\=\$1($|&)
RewriteRule ^link\.php$ /link/? [L,R=301]
zip -r -0
chown -R user:group /var/www/site.ru/
stream {
upstream stream_backend {
zone tcp_servers 64k;
server 192.168.55.201:3308;
server 192.168.55.202:3308;
server 192.168.55.203:3308;
}