Transfer your Windows Backups to an rsync server over SSH

rsync.net provides cloud storage for offsite backups. If you run Windows systems, you can point them to us to secure your data.

Our cloud storage is better than AWS, Google or Azure because we give you an empty filesystem to do anything you want with.

Click here for Simple Pricing - Or call 619-819-9156 or email info@rsync.net for more information.

One thing you might choose to do is point your Windows backups to us using rsync over SSH.

Below is a tutorial that will work with any Linux/UNIX/SSH server - not just rsync.net.

rsync on Windows - An Overview

We no longer recommend that Windows users of our cloud storage platform use rsync.exe to send their backups to rsync.net.

cwRsync can be difficult to set up, and getting it to run unattended, under the correct Windows account, can be challenging.

Instead, we recommend either our free Windows Backup Agent or pay for a BackupAssist license with the rsync module.

But if you must ...

Installing cwRsync

cwRsync is a free distribution of the rsync utility that is optimized for quick and easy installation in Microsoft Windows.

You can download cwRsync here, however we recommend checking for the newest version here.

Once you have downloaded this installation file, run it. You should select the defaults the installer gives you, including the default installation path of:

C:\Program Files\cwRsync

We STRONGLY recommend installing the program in the default location.

Setting Up Your Private/Public Keypair

You need to create, and upload, an SSH public key so that your rsync backups can occur without your being prompted for a password.

It is VERY IMPORTANT that the user who creates the key is the SAME user as the one who runs the automated backup. The easiest way to ensure this is to log in as the local "administrator" to perform the following steps:

Click the start button, and choose "run". In the run dialog box, type "cmd" and hit enter. The command prompt window (DOS prompt) will open.

In this command prompt, type:

cd "c:\program files\cwrsync\bin"

and hit enter. Then type:

ssh-keygen -t rsa -N ''

and hit enter.

(Note that the line ends with TWO single quote characters, one after another)

You will be asked to "enter file in which to save the key" - just hit enter to accept the default that is given.

Now, upload the newly created key to your rsync.net filesystem with this command:

rsync -av "/cygdrive/c/documents and settings/administrator/.ssh/id_rsa.pub" 1234@usw-s001.rsync.net:.ssh/authorized_keys

(Insert your own user ID in place of "1234" as well and the correct hostname in place of "s001")

When you run this rsync command, you will be asked to confirm the first connection - enter "yes", and when prompted for your password, enter the password that was given to you in your welcome email.

Your RSA public key is now uploaded to your rsync.net filesystem, and any further logins over ssh that this Windows user (in this case, administrator) performs will not require a password.

Choosing What To Back Up

Now you need to decide what to back up. Generally, installed programs, like the ones installed in C:\Program Files are not important to back up, nor is your primary C:\Windows folder. Generally you are only interested in backing up your data, often times limited to c:\My Documents, or c:\Documents and Settings.

In this example we are choosing to back up the following directory:

C:\Documents and Settings\administrator

Open the rsync script by going to the start menu, choosing Programs, then choosing cwRsync, then choosing "1. Batch Example". When you select this, the script will open in a text editor.

Leave the file exactly as it is - the settings in place are very important. You are simply going to add one or more rsync commands to the end of it, one for each folder or file you want to back up.

In this example we are adding a single line to the end of the file:

rsync -av --chmod u+rwx
-e "ssh -i c:\docume~1\administrator\.ssh\id_rsa"
"/cygdrive/c/Documents and Settings/administrator"
1234@usw-s001.rsync.net:

You can see how the source directory:

C:\Documents and Settings\administrator

is entered as

/cygdrive/c/Documents and Settings/administrator

this transformation is required for all Windows source folders.

You can add as many rsync lines to the end of this script as you like - one for each folder you wish to back up.

Once the rsync lines have been added to the script, you should save the file and exit the editor.

Scheduling the Backup

All that is left now is to schedule the backup, which is done through Task Scheduler, which is included in Windows.

Open Task Scheduler by choosing: Start Menu, Programs, Accessories, System Tools, Scheduled Tasks.

The Scheduled Tasks explorer will open. Double click the item named "Add Scheduled Task".

In the first Window, simply click "Next".

In the second Window, you are asked to "click the program you want windows to run". Do not choose a program from the list. Instead, click the "browse" button.

Choose the program c:\program files\cwrsync\cwrsync.cmd

In the third window, you are asked to "type a name for this task" - you can name it whatever you like. Perhaps "rsync.net Automated Backup".

You are also asked, in this third window, how often to perform the task. In this example we will choose to perform the backup weekly.

In the fourth window, you are asked to choose a start time. We suggest sometime between 10pm and 6am. You should not perform these backups during the business day, as the network traffic they consume could affect your work.

In the fifth window, you are asked to "Enter the name and password of a user" - this is the Windows login that the backup will run under, and it is important that you choose the same Windows login that you used to create your RSA key, above. The username is entered in the form computername\username ... for instance: server01\administrator The password should be entered as well.

In the sixth and final window, click "finish".

Testing Your Backup

It is extremely important that you test your backup. You are testing not only that the backup works properly and transfers the files you think it will, but also that it will properly log into your rsync.net filesystem without prompting you for a password.

The first test, making sure the automated backup is not prompted for a password, is performed simply by running the backup yourself. From the start menu, choose Run, and type in the location of your backup script:

c:\progra~1\cwrsync\cwrsync.cmd

You should see the backup run in the command prompt that appears, and it should complete without asking you for a password.

After you have completed a successful backup, and periodically as time goes on, you should then log into your rsync.net account and browse your filesystem.

The different methods of browsing your rsync.net filesystem in Windows are detailed here:

Windows Integration Overview

Additional Notes

- When testing your backup, be sure that Administrator is NOT logged onto the system twice - otherwise the DOS window that appears when your backup runs automatically from the Windows scheduler may appear in the other session (perhaps a remote access login). Having the administrator account logged into the system more than once can cause you not to see error messages that will help you diagnose the batch file if it is not running properly from the Windows scheduler.

- The sample rsync command above has a setting: --chmod u+rwx that ensures that all files you upload to rsync.net, in addition to whatever other permissions they have, are given read/write/execute permission for the files owner. This setting is highly recommended and should only be altered if you know exactly what you are doing. It should be noted, however, that this may result in files on the remote side with more permissive permissions than the source files.

More Information

rsync.net publishes a wide array of support documents as well as a FAQ

You, or your CEO, may find our CEO Page useful.

Please see our HIPAA and Sarbanes-Oxley complianc e statements.

Contact info@rsync.net for more information, and answers to your questions.

http://www.rsync.net/resources/howto/windows_rsync.html

rsync Backups for Windows的更多相关文章

  1. Windows和Linux之间 rsync数据同步

    转载于   https://www.linuxidc.com/Linux/2014-01/95722p2.htm rsync是类unix系统下的数据镜像备份工具,从软件的命名上就可以看出来了——rem ...

  2. 使用rsync在linux(服务端)与windows(客户端)之间同步

    说明: 1.RsyncServer服务端 系统:CentOS 6.8 IP地址:192.168.247.141 2.Rsync客户端 系统:Windows10 实现目的: Rsync客户端同步服务端/ ...

  3. 烂泥:Linux系统与windows系统文件同步

    本文由秀依林枫提供友情赞助,首发于烂泥行天下. 上篇文章中,我们介绍了有关Linux系统之间的文件同步,这篇文章我们来介绍下,有关Linux系统与windows系统,以及windows系统与windo ...

  4. Windows下cwRsync搭建步骤

    文章(一) CwRsync是基于cygwin平台的rsync软件包,支持windows对windows.windows对Linux.Linux对windows高效文件同步.由于CwRsync已经集成了 ...

  5. rsync用于数据迁移/备份的几个细节

    上周我们的一个GitLab服务频繁出现web页面卡死问题,得重启虚拟机才可恢复,但重启之后没多久又会卡死.后来发现是虚拟机的磁盘大小超过了2T,而虚拟机管理那层的文件系统是ext3,最大单文件只能支持 ...

  6. Rsync的配置与使用

    一.介绍 (不想看直接可以跳过) Rsync是一个远程数据同步工具,可通过LAN/WAN快速同步多台主机间的文件.Rsync本来是用以取代rcp的一个工具,它当前由 rsync.samba.org维护 ...

  7. rsync 3.1.3

    rsyncd.conf 2018年1月28日 rsyncd配置(5) 2018年1月28日 姓名 rsyncd.conf配置rsync守护进程的方式在file for 概要 rsyncd.conf 描 ...

  8. rsync全网备份

    rsync备份企业方案 企业有Linux服务器又有windows服务器,备份用rsync(服务端),Linux(客户端),Windows(客户端,cwrsync,旧版本有免费版)打包压缩数据往服务器上 ...

  9. 配置rsync同步文件到nas

    windows下以前的做法是安装一个cygwin包,现在不需要了,直接安装一个linux子系统用linux命令就行了. start cmd /k "c:\cygwin64\bin\rsync ...

随机推荐

  1. 基于visual Studio2013解决算法导论之016查找最大值最小值

     题目 查找最大.最小值 解决代码及点评 #include <stdio.h> #include <stdlib.h> #include <malloc.h> ...

  2. iOS开发之XMPP即时通讯简单实现

    首先搭载服务器和数据库 搭载服务器我用的是openfire,数据库用的是mysql 这里推荐两个链接 配置mysql,用的是mysql workbench http://justsee.iteye.c ...

  3. C++ 檔案、資料夾、路徑處理函式庫:boost::filesystem

    原帖:https://tokyo.zxproxy.com/browse.php?u=uG7kXsFlW1ZmaxKEvCzu8HrCJ0bXIAddA1s5dtIUZ%2FYzM1u9JI7jjKLT ...

  4. MySQL中innodb引擎分析(初始化)

    MySQL的存储引擎是以插件形式工作的,这应该是MySQL的一大特色了吧! 依据<深入理解MySQL>的内容,5.1版本号时存储引擎的插件化都还不是彻底,确切的说是刚加入的特性.为MySQ ...

  5. o(n)解决问题:调整数组顺序是奇数位于偶数的前面

    问题描述: 输入一个整数数组,调整数组中数字的顺序,使得所有奇数位于数组的前半部分,所有偶数位于数组的后半部分 void reOrder(int *a,int len) { if(a==NULL || ...

  6. Excel 公式(细节若干)

    查找与引用: 1.如果需要找出匹配元素的位置而不是匹配元素本身,则应该使用 MATCH 函数而不是 LOOKUP 函数. 2.VLOOKUP的第一个参数允许使用通配符“*”来表示包含的意思,把*放在字 ...

  7. 查看ORACLE事务隔离级别方法(转)

    众所周知,事务的隔离级别有序列化(serializable),可重复读(repeatable read),读已提交(read committed),读未提交(read uncommitted).根据隔 ...

  8. Android中Parcelable序列化总结

    在使用Parcelable对android中数据的序列化操作还是比较有用的,有人做过通过对比Serializable和Parcelable在android中序列化操作对象的速度比对,大概Parcela ...

  9. iOS技术开发-人机交互指南之UI设计基础:iOS App Anatomy

    第二篇更多的是从技术的角度对iOS界面组成原理进行了简单的解析,篇幅很短,可稍作了解:更多关于iOS开发入门的内容可参考“设计师应该了解的iOS应用开发基础知识”一文.另外,非常感谢各位朋友在微博上的 ...

  10. MIPI CSI-2规范一——概述及层级

    MIPI CSI-2规范一——概述及层级 CSI-2概述 CSI-2规范定义了发送者和接收者之间传输和控制接口的标准数据.数据传输接口(指CSI-2)是单向差分串行接口,传输数据和始终信号:接口的物理 ...