This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Расшифровка некоторых показателей SMART диагностики: | |
| 01 (01) Raw Read Error Rate — Частота ошибок при чтении данных с диска, происхождение которых обусловлено аппаратной частью диска. Для всех дисков Seagate, Samsung это — число внутренних коррекций данных, проведенных до выдачи в интерфейс, следовательно, на пугающе огромные цифры можно реагировать спокойно. | |
| 02 (02) Throughput Performance — Общая производительность диска. Если значение атрибута уменьшается, то велика вероятность, что с диском есть проблемы. | |
| 03 (03) Spin-Up Time — Время раскрутки пакета дисков из состояния покоя до рабочей скорости. Растет при износе механики (повышенное трение в подшипнике и т. п.), также может свидетельствовать о некачественном питании (например, просадке напряжения при старте диска). | |
| 04 (04) Start/Stop Count — Полное число циклов запуск-остановка шпинделя. У дисков некоторых производителей (например, Seagate) — счётчик включения режима энергосбережения. В поле raw value хранится общее количество запусков/остановок дис |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #устанавливаем необходимое для работы скрипта | |
| sudo apt install postgresql-client | |
| sudo apt install curlftpfs | |
| sudo apt install sendemail | |
| #проверить откравку почты, если есть ошибка | |
| #ERROR => No TLS support! SendEmail can't load required libraries. (try installing Net::SSLeay and IO::Socket::SSL) | |
| #устанавливаем sudo apt-get install libio-socket-ssl-perl libnet-ssleay-perl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| ::------------------------------------------------------------------- | |
| :: Settings | |
| ::------------------------------------------------------------------- | |
| SET BACKUPPATH=\\192.168.1.131\share\backups\srv2008lab\WindowsImageBackup | |
| SET SERVERNAME=srv2008lab | |
| SET ROTATEDAY=5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| set HOSTNAME=server\sqllab | |
| set USERNAME=sa | |
| SET SQLPASSWORD=password | |
| SET FILENAME=BDLAB | |
| SET BACKUPPATH=C:\SQLDATA\backup | |
| SET BACKUPSQLSCRIPT=%BACKUPPATH%\dbbackup.sql | |
| SET TIMESHTAMP=%DATE: =0% | |
| :: Выполняем скрипт в SQL | |
| sqlcmd -S %HOSTNAME% -U %USERNAME% -P %SQLPASSWORD% -i "%BACKUPSQLSCRIPT%" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Добавляем скрипт в cron: | |
| # sudo crontab -e | |
| # * * * * * /home/admin/pg_backup.sh > /dev/null 2>&1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| HOST=127.0.0.1 | |
| USER="" | |
| PASSWORD="" | |
| DB_NAME="" | |
| BACKUP_PATH="." | |
| DATE=$(date +"%d-%b-%Y") | |
| PGPASSWORD="$PASSWORD" pg_dump -h $HOST -U $USER $DB_NAME > $BACKUP_PATH/$DB_NAME-$DATE.sql | |
| zip $BACKUP_PATH/$DB_NAME-$DATE.zip $BACKUP_PATH/$DB_NAME-$DATE.sql | |
| rm $BACKUP_PATH/$DB_NAME-$DATE.sql | |
| #find $BACKUP_PATH/* -mtime +14 -exec rm {} \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://aslenkov.ru/likbez/474 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ::Изменение политики безопасности для добавления репозитория | |
| Set-Executionpolicy Unrestricted | |
| ::добавляем репозиторий | |
| Get-PackageProvider –Name Chocolatey –ForceBootstrap | |
| ::находим и устанавливаем пакеты | |
| Find-Package -name far | Install-Package -force | |
| Find-Package -name 7zip | Install-Package -force | |
| Find-Package -name googlechrome | Install-Package -force | |
| Find-Package -name adobereader | Install-Package -force | |
| Find-Package -name flashplayerplugin | Install-Package -force |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| ::устанавливаем mremote в общую сетевую папку (https://github.com/mRemoteNG/mRemoteNG), например в \\server-share\shared_data\mRemote:: | |
| ::Заходим в корень диска С и создаем папку mRemote | |
| cd C:\ | |
| mkdir mRemote | |
| ::Указываем переменные куда и откуда | |
| set mRemote.folder="c:\mRemote" | |
| set mRemote.etalon="\\server-share\shared_data\mRemote" | |
| ::Заходим в созданный каталог с помощью переменной | |
| cd %mRemote.folder% |