#################################################
# rsnapshot.conf - rsnapshot configuration file #
#################################################
config_version 1.2
# All snapshots will be stored under this root directory.
#
# what ron uses
snapshot_root /bkup/private/
# If no_create_root is enabled, rsnapshot will not automatically create the
# snapshot_root directory. This is particularly useful if you are backing
# up to removable media, such as a FireWire or USB drive.
#
no_create_root 1
#################################
# EXTERNAL PROGRAM DEPENDENCIES #
#################################
# LINUX USERS: Be sure to uncomment "cmd_cp". This gives you extra features.
# EVERYONE ELSE: Leave "cmd_cp" commented out for compatibility.
#
# See the README file or the man page for more details.
#
cmd_cp /bin/cp
# uncomment this to use the rm program instead of the built-in perl routine.
#
cmd_rm /bin/rm
# rsync must be enabled for anything to work. This is the only command that
# must be enabled.
#
cmd_rsync /usr/bin/rsync
# Uncomment this to enable remote ssh backups over rsync.
#
#cmd_ssh /usr/bin/ssh
# Comment this out to disable syslog support.
#
cmd_logger /bin/logger
# Uncomment this...
# Uncomment that...
#########################################
# BACKUP LEVELS / INTERVALS #
# Must be unique and in ascending order #
# e.g. alpha, beta, gamma, etc. #
#########################################
# retain alpha 6
# retain beta 7
# retain gamma 4
# retain delta 3
# what ron uses, daily non-incremental backup via cron at 2am,
# crontab entry: * 2 * * * /usr/local/bin/rsnapshot daily
retain daily 1
############################################
# GLOBAL OPTIONS #
# All are optional, with sensible defaults #
############################################
# Verbose level, 1 through 5.
# 1 Quiet Print fatal errors only
# 2 Default Print errors and warnings only
# 3 Verbose Show equivalent shell commands being executed
# 4 Extra Verbose Show extra verbose information
# 5 Debug mode Everything
#
verbose 2
# Same as "verbose" above, but controls the amount of data sent to the
# logfile, if one is being used. The default is 3.
#
loglevel 3
# If you enable this, data will be written to the file you specify. The
# amount of data written is controlled by the "loglevel" parameter.
#
logfile /var/log/rsnapshot
[... bunch of stuff removed to post on stackexchange easier...]
###############################
### BACKUP POINTS / SCRIPTS ###
###############################
# LOCALHOST
# backup /home/ localhost/
# backup /etc/ localhost/
# backup /usr/local/ localhost/
# backup /var/log/rsnapshot localhost/
# backup /etc/passwd localhost/
# backup /home/foo/My Documents/ localhost/
# backup /foo/bar/ localhost/ one_fs=1, rsync_short_args=-urltvpog
# backup_script /usr/local/bin/backup_pgsql.sh localhost/postgres/
# You must set linux_lvm_* parameters below before using lvm snapshots
# backup lvm://vg0/xen-home/ lvm-vg0/xen-home/
# EXAMPLE.COM
# backup_exec /bin/date "+ backup of example.com started at %c"
# backup [email protected]:/home/ example.com/ +rsync_long_args=--bwlimit=16,exclude=core
# backup [email protected]:/etc/ example.com/ exclude=mtab,exclude=core
# backup_exec ssh [email protected] "mysqldump -A > /var/db/dump/mysql.sql"
# backup [email protected]:/var/db/dump/ example.com/
# backup_exec /bin/date "+ backup of example.com ended at %c"
# CVS.SOURCEFORGE.NET
# backup_script /usr/local/bin/backup_rsnapshot_cvsroot.sh rsnapshot.cvs.sourceforge.net/
# RSYNC.SAMBA.ORG
# backup rsync://rsync.samba.org/rsyncftp/ rsync.samba.org/rsyncftp/
# what ron uses, very simple, local disks
# /data is /dev/sdb1 an N tb drive
# snapshot root folder /bkup is /dev/sdc1 an n tb volume
# this will copy everything under /data to /bkup/private/mybackup/
backup /data mybackup/
Cygwin 具有 openssh(客户端和服务器)和 rsync,因此您当然可以使用它来创建一个 rsync 目标,就像在 linux 上一样。
我主要担心的是文件系统问题。Rsync 尝试同步元数据,而不是在单独的位置捕获它(喜欢
tar
或zip
会这样做)。这意味着元数据与目标文件系统不兼容的地方,你会遇到问题。如果您尝试通过没有任何奇怪名称且所有权/权限不是什么大问题的网络文件夹进行同步,那么它应该可以正常工作。如果您正在尝试同步 linux 根文件系统并希望保留所有设备和权限,我认为 rsync 到 Windows 上可能会更成问题。
另一种方法是在 Windows 服务器内运行 linux VM。然后,您可以根据需要配置 VM。如果它只做一些非工作时间的文件传输,并且您有足够的 RAM,那么它根本不会影响 windows 服务器的性能。
rsnapshot.conf
如果您设置了一项服务,我认为 SSH 是首选,但它可能是 RSH 或其他服务,它就像通过定制 rsnapshot.conf 文件从源复制到目标一样简单。
https://wiki.archlinux.org/index.php/Rsnapshot
https://rsnapshot.org/
http://www.mikerubel.org/computers/rsync_snapshots/
rsnapshot 如果安装在 linux 上会很棒,并且当从源备份到目标时,源基本上是挂载在 linux 上的任何东西。实现挂载在linux上不需要是本地磁盘。