0

I would like to backup a remote linux server into a windows workstation.

I am looking for an approach similar to this, but in windows: Backup from remote server

Is there any rsync client for windows that I can use, or any GUI application that uses rsync underneath? I would need to be able to connect using an SSH key, and have it run daily to synchronize remote files into the windows machine.

  • Note if you keep the OS and user files separate, then it is easier to do backups. – ctrl-alt-delor Feb 5 at 16:15
  • Is you question: What GUI tools exist for Microsoft's Windows, that allow me to do backups of remote devices, using open standards (such as rsync)? If so this may not be the best place to ask. Have you also considered having the Gnu/Linux server attach to a Windows share, and then have the Gnu/Linux server do the backup? – ctrl-alt-delor Feb 5 at 16:18
  • @ctrl-alt-delor There is no need for gui. it can be cygwin based, command line or GUI. GUI is a nice to have just to make it easier to use. Requirements are: Works in Windows, retrieves files through rsync preferrably with SSH, and can be called from a daily scheduled task. – BlunT Feb 5 at 16:34
  • I have big doubts explaining how to do it from native Windows tools is on topic here. – Rui F Ribeiro Feb 5 at 19:09
  • linux -> anything... rsnapshot – ron Feb 5 at 19:15
0

Cygwin has openssh (client and server) and rsync, so you can certainly use that to create an rsync target just about the same as you would on linux.

My main worry would be filesystem issues. Rsync attempts to sync metadata, not capture it in a separate location (like tar or zip would do). That means where the metadata is not compatible with the target filesystem, you'll have problems.

  • Users may not be the same on both machines
  • NTFS filenames have more restrictions than most linux filesystems.
  • I have no idea what would happen if rsync requests device special files on NTFS.

If you're trying to sync over a web folder without any odd names and where the ownership/permission isn't a big deal, it should work pretty well. If you're trying to sync a linux root filesystem and want to preserve all the devices and permissions, I think rsync onto windows may be more of a problem.

Another approach would be to run a linux VM inside the windows server. Then you could configure the VM as you want. If the only thing it does is some off-hours file transfer, and you have plenty of RAM, it shouldn't affect the performance of the windows server much at all.

  • The goal is to have a second offsite backup of linux servers. I would be using windows workstations, just because they are on most of the time, so any night they are unused and could be left synchronizing data. I want to sync user folders, cpanel accounts which contain websites, emails and other stuff. Can I mount the partition in a way that the metadata can be preserved? Or is that not a concern? – BlunT Feb 5 at 20:38
0

rsnapshot.conf

#################################################
# 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/

If you set up a service and I think SSH is the preferred but it could be RSH or others, it's as simple as copy from source to destination via tailoring the rsnapshot.conf file.

https://wiki.archlinux.org/index.php/Rsnapshot

https://rsnapshot.org/

http://www.mikerubel.org/computers/rsync_snapshots/

rsnapshot is a filesystem snapshot utility based on rsync. rsnapshot makes it easy to make periodic snapshots of local machines, and remote machines over ssh. The code makes extensive use of hard links whenever possible, to greatly reduce the disk space required. Rsnapshot is written entirely in perl with no module dependencies, and has been tested with versions 5.004 through 5.16.3. It should work on any reasonably modern UNIX compatible OS.

rsnapshot is great if installed on linux, and when backing up from source to destination where source is basically anything mounted on linux. Realize mounted on linux does not need to be local disks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.