Установить Cygwin
Готовый варинт cygwin-rsyncd 64 бит
setup-x86_64.exe
setup-x86.exe
TUTORIALS Rsync
SSH and Rsync within Cygwin
Installing & Using Rsync on Windows
Настройка обмена РИБ через RSYNC
RSYNC: Резервное копирование. Простой backup-скрипт
Заметки
Backing up Windows machines using rsync and ssh by Manu Garg
man rsyncd.conf
Найти и установить rsync
Скоприровать файлы (32 bit)
c:\cygwin\bin\rsync.exe
c:\cygwin\bin\cygwin1.dll
c:\cygwin\bin\cygiconv-2.dll
c:\cygwin\bin\cyggcc_s-1.dll
c:\cygwin\bin\cygpopt-0.dll
c:\cygwin\bin\cygintl-8.dll
в папку c:\rsync\
>rsync --version
rsync version 3.1.2 protocol version 31
Copyright (C) 1996-2015 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,
socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
append, ACLs, no xattrs, iconv, symtimes, prealloc
rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you
are welcome to redistribute it under certain conditions. See the GNU
General Public Licence for details.
Создать файл c:\rsync\rsync.conf
use chroot = no
pid file = rsync.pid
strict modes = false
[backup]
path=/cygdrive/D/Copy/Backup/1
read only = no
Сохранить.
Создать файл c:\rsync\rsync.bat
del /F /Q c:\rsync\rsync.pid
rsync.exe --daemon --config=/cygdrive/c/rsync/rsync.conf --log-file=/cygdrive/c/rsync/rsyncservice.log --address=192.168.0.2
Сохранить.
Запускать планировщиком при входе в систему
c:\rsync\rsync.bat
или по необходимости.
На клиенте:
>rsync -avz 192.168.0.2::backup /cygdrive/D/z --progress
Готовый варинт cygwin-rsyncd 64 бит
setup-x86_64.exe
setup-x86.exe
TUTORIALS Rsync
SSH and Rsync within Cygwin
Installing & Using Rsync on Windows
Настройка обмена РИБ через RSYNC
RSYNC: Резервное копирование. Простой backup-скрипт
Заметки
Backing up Windows machines using rsync and ssh by Manu Garg
man rsyncd.conf
Найти и установить rsync
Скоприровать файлы (32 bit)
c:\cygwin\bin\rsync.exe
c:\cygwin\bin\cygwin1.dll
c:\cygwin\bin\cygiconv-2.dll
c:\cygwin\bin\cyggcc_s-1.dll
c:\cygwin\bin\cygpopt-0.dll
c:\cygwin\bin\cygintl-8.dll
в папку c:\rsync\
>rsync --version
rsync version 3.1.2 protocol version 31
Copyright (C) 1996-2015 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,
socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
append, ACLs, no xattrs, iconv, symtimes, prealloc
rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you
are welcome to redistribute it under certain conditions. See the GNU
General Public Licence for details.
Создать файл c:\rsync\rsync.conf
use chroot = no
pid file = rsync.pid
strict modes = false
[backup]
path=/cygdrive/D/Copy/Backup/1
read only = no
Сохранить.
Создать файл c:\rsync\rsync.bat
del /F /Q c:\rsync\rsync.pid
rsync.exe --daemon --config=/cygdrive/c/rsync/rsync.conf --log-file=/cygdrive/c/rsync/rsyncservice.log --address=192.168.0.2
Сохранить.
Запускать планировщиком при входе в систему
c:\rsync\rsync.bat
или по необходимости.
На клиенте:
>rsync -avz 192.168.0.2::backup /cygdrive/D/z --progress
Настройка Ubuntu 16.04
$ sudo nano /etc/default/rsync
#RSYNC_ENABLE=false
RSYNC_ENABLE=true
Сохранить.
$ sudo nano /etc/rsyncd.conf
# create new
# any name you like
[backup]
# destination directory to copy
path = /home/backup
# hosts you allow to access
hosts allow = 192.168.1.0/255.255.255.0
hosts deny = *
list = true
uid = root
gid = root
read only = false
Сохранить.
$ sudo mkdir /home/backup
$ sudo systemctl enable rsync
$ sudo systemctl start rsync
RSync. Примеры использования
Проверка:
>rsync 192.168.0.5::backup
drwxr-xr-x 4,096 2019/05/27 19:43:53 .
drwxrwx--- 4,096 2019/04/15 17:56:35 backups
Синхронизация:
>rsync -avz /cygdrive/C/pg_probackup/backups 192.168.0.5::backup --progress
Синхронизация в папку с датой
>rsync --delete -backup --backup-dir=/backup-%DATE:~6,4%-%DATE:~3,2%-%DATE:~0,2% -avz /cygdrive/C/pg_probackup/backups 192.168.0.5::backup/backup-%DATE:~6,4%-%DATE:~3,2%-%DATE:~0,2% --progress
rsync --delete -backup --backup-dir=/backup-%DATE:~6,4%-%DATE:~3,2%-%DATE:~0,2% -avz /cygdrive/C/pg_probackup/backups 10.8.0.1::backup/backup-%DATE:~6,4%-%DATE:~3,2%-%DATE:~0,2% --progress
rsync --delete -backup --backup-dir=/backup-%DATE:~6,4%-%DATE:~3,2%-%DATE:~0,2% -avz /cygdrive/D/copy/Arhiv 10.8.0.1::backup/backup-%DATE:~6,4%-%DATE:~3,2%-%DATE:~0,2% --progress
rsync --delete -avz 10.8.0.1::backup /cygdrive/D/z --progress
===================================================
Готовый варинт cygwin-rsyncd 64 бит
Запуск службы, повторить структуру каталогов как
Загрузите rsyncd вариант без инсталлятора
Заменить *.exe и *.dll на 32 бит из c:\cygwin\bin\
Еще понадобится c:\cygwin\bin\cygrunsrv
Установка демона:
Файл c:\rsyncd\rsyncd.conf
use chroot = false
strict modes = false
hosts allow = *
log file = rsyncd.log
# Module definitions
# Remember cygwin naming conventions : c:\work becomes /cygwin/c/work
#
[diskc]
path = /cygdrive/c/
read only = false
transfer logging = yes
[diskd]
path = /cygdrive/d/
read only = false
transfer logging = yes
[diske]
path = /cygdrive/e/
read only = false
transfer logging = yes
[diskf]
path = /cygdrive/f/
read only = false
transfer logging = yes
Файл start.bat
c:/rsyncd/bin/rsync.exe --daemon --config=c:/rsyncd/rsyncd.conf --log-file=/cygdrive/c/rsyncd/rsyncservice.log --address=192.168.1.226
Пример:
g:/rsyncd/bin/rsync.exe -r /cygdrive/d/yandex_disk/backup_2019_04_18.7z 192.168.1.226::diskc/rsyncd --progress
backuppc_rsync-server.nsi
Ручная регистрация службы RsyncServer
c:\rsyncd\bin\cygrunsrv -I "RsyncServer" -p /cygdrive/c/rsyncd/bin/rsync.exe -a "--config=/cygdrive/c/rsyncd/rsyncd.conf --daemon --no-detach" -o -t auto -e "CYGWIN=nontsec binmode" -1 /cygdrive/c/rsyncd/rsyncd-stdin.log -2 /cygdrive/c/rsyncd/rsyncd-stderr.log -y tcpip -f "Rsync daemon service"
Полезные команды:
c:\rsyncd\bin\cygrunsrv --verbose --start "RsyncServer"
Удаление службы RsyncServer
c:\rsyncd\bin\cygrunsrv --verbose --stop "RsyncServer"
c:\rsyncd\bin\cygrunsrv -R "RsyncServer"
c:\rsyncd\bin\cygrunsrv --help
#RSYNC_ENABLE=false
RSYNC_ENABLE=true
Сохранить.
$ sudo nano /etc/rsyncd.conf
# create new
# any name you like
[backup]
# destination directory to copy
path = /home/backup
# hosts you allow to access
hosts allow = 192.168.1.0/255.255.255.0
hosts deny = *
list = true
uid = root
gid = root
read only = false
Сохранить.
$ sudo mkdir /home/backup
$ sudo systemctl enable rsync
$ sudo systemctl start rsync
RSync. Примеры использования
Проверка:
>rsync 192.168.0.5::backup
drwxr-xr-x 4,096 2019/05/27 19:43:53 .
drwxrwx--- 4,096 2019/04/15 17:56:35 backups
Синхронизация:
>rsync -avz /cygdrive/C/pg_probackup/backups 192.168.0.5::backup --progress
Синхронизация в папку с датой
>rsync --delete -backup --backup-dir=/backup-%DATE:~6,4%-%DATE:~3,2%-%DATE:~0,2% -avz /cygdrive/C/pg_probackup/backups 192.168.0.5::backup/backup-%DATE:~6,4%-%DATE:~3,2%-%DATE:~0,2% --progress
rsync --delete -backup --backup-dir=/backup-%DATE:~6,4%-%DATE:~3,2%-%DATE:~0,2% -avz /cygdrive/C/pg_probackup/backups 10.8.0.1::backup/backup-%DATE:~6,4%-%DATE:~3,2%-%DATE:~0,2% --progress
rsync --delete -backup --backup-dir=/backup-%DATE:~6,4%-%DATE:~3,2%-%DATE:~0,2% -avz /cygdrive/D/copy/Arhiv 10.8.0.1::backup/backup-%DATE:~6,4%-%DATE:~3,2%-%DATE:~0,2% --progress
rsync --delete -avz 10.8.0.1::backup /cygdrive/D/z --progress
===================================================
Готовый варинт cygwin-rsyncd 64 бит
Запуск службы, повторить структуру каталогов как
Загрузите rsyncd вариант без инсталлятора
Заменить *.exe и *.dll на 32 бит из c:\cygwin\bin\
Еще понадобится c:\cygwin\bin\cygrunsrv
Установка демона:
Файл c:\rsyncd\rsyncd.conf
use chroot = false
strict modes = false
hosts allow = *
log file = rsyncd.log
# Module definitions
# Remember cygwin naming conventions : c:\work becomes /cygwin/c/work
#
[diskc]
path = /cygdrive/c/
read only = false
transfer logging = yes
[diskd]
path = /cygdrive/d/
read only = false
transfer logging = yes
[diske]
path = /cygdrive/e/
read only = false
transfer logging = yes
[diskf]
path = /cygdrive/f/
read only = false
transfer logging = yes
Файл start.bat
c:/rsyncd/bin/rsync.exe --daemon --config=c:/rsyncd/rsyncd.conf --log-file=/cygdrive/c/rsyncd/rsyncservice.log --address=192.168.1.226
Пример:
g:/rsyncd/bin/rsync.exe -r /cygdrive/d/yandex_disk/backup_2019_04_18.7z 192.168.1.226::diskc/rsyncd --progress
backuppc_rsync-server.nsi
Ручная регистрация службы RsyncServer
c:\rsyncd\bin\cygrunsrv -I "RsyncServer" -p /cygdrive/c/rsyncd/bin/rsync.exe -a "--config=/cygdrive/c/rsyncd/rsyncd.conf --daemon --no-detach" -o -t auto -e "CYGWIN=nontsec binmode" -1 /cygdrive/c/rsyncd/rsyncd-stdin.log -2 /cygdrive/c/rsyncd/rsyncd-stderr.log -y tcpip -f "Rsync daemon service"
Полезные команды:
c:\rsyncd\bin\cygrunsrv --verbose --start "RsyncServer"
Удаление службы RsyncServer
c:\rsyncd\bin\cygrunsrv --verbose --stop "RsyncServer"
c:\rsyncd\bin\cygrunsrv -R "RsyncServer"
c:\rsyncd\bin\cygrunsrv --help
Комментариев нет:
Отправить комментарий