我想将远程linux服务器备份到windows工作站中。
我正在寻找一种类似于此的方法,但在windows:来自远程服务器的备份中
是否有任何用于窗口的rsync客户端,或者在下面使用rsync的GUI应用程序?我需要能够使用SSH键进行连接,并让它每天运行,以便将远程文件同步到windows机器。
发布于 2019-02-05 19:06:47
Cygwin有openssh (客户机和服务器)和rsync,所以您当然可以使用它创建一个rsync目标,就像在linux上一样。
我主要担心的是文件系统问题。Rsync尝试同步元数据,而不是在单独的位置捕获元数据(就像tar或zip那样)。这意味着在元数据与目标文件系统不兼容的地方,您将遇到问题。
如果您试图在没有任何奇怪名称的情况下通过web文件夹进行同步,并且所有权/权限不是什么大问题,那么它应该运行得很好。如果您试图同步linux根文件系统,并希望保留所有设备和权限,我认为在windows上进行rsync可能更有问题。
另一种方法是在windows服务器内运行linux。然后,您可以根据需要配置VM。如果它所做的仅仅是一些非工作时间的文件传输,并且您有大量的RAM,那么它根本不应该对windows服务器的性能产生太大的影响。
发布于 2019-02-05 21:39:02
#################################################
# 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 root@example.com:/home/ example.com/ +rsync_long_args=--bwlimit=16,exclude=core
# backup root@example.com:/etc/ example.com/ exclude=mtab,exclude=core
# backup_exec ssh root@example.com "mysqldump -A > /var/db/dump/mysql.sql"
# backup root@example.com:/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/如果您设置了一个服务,并且我认为SSH是首选的,但它可能是RSH或其他服务,那么它就像通过裁剪rsnapshot.conf文件从源复制到目的地一样简单。
https://wiki.archlinux.org/index.php/Rsnapshot
http://www.mikerubel.org/computers/rsync_快照/
R快照是基于rsync的文件系统快照实用程序。R快照使在ssh上对本地机器和远程机器进行定期快照变得很容易。代码尽可能广泛地使用硬链接,以大大减少所需的磁盘空间。R快照完全是用perl编写的,没有模块依赖,并且已经在5.004到5.16.3版本中进行了测试。它应该在任何合理的现代UNIX兼容操作系统上工作。
如果安装在linux上,并且在从源代码备份到目标(源代码基本上是安装在linux上的任何东西)时,r快照都是很棒的。实现在linux上挂载不需要是本地磁盘。
https://unix.stackexchange.com/questions/498836
复制相似问题