Table of Contents
luckyBackup is a a powerful, fast and reliable backup & sync tool.
This page provides information and support for the Windows port of luckyBackup. The current status of the port can be summed up with something like, “It mostly works and there is active development to improve it.” The Windows version of luckyBackup is not however 100% functional and there are known (and probably unknown) glitches and bugs with it. Please if you find any problems report them back to us so that we can get them resolved and make luckyBackup just as fantastic on Windows as it already is on Linux.
A side note! I'm brand new at using Qt and C++ is pretty sketchy for me since I haven't used C in years. So the “active development” means, a slow but steady progress.
Please reference http://luckybackup.sourceforge.net/ for more information about luckyBackup and other ports or distributions of it.
For support please use the luckyBackup forums on sourceforge if possible. Otherwise you may contact the author for general support or BMT Solutions for e-mail support of the Windows port (Phone support is not provided).
My (Current) Build/Test Environment
This is accurate for version 0.4.7 based on my testing. Please report any problems.
|Local > Local Backup||Works!|
|Local > Remote Rsync Backup||Works!|
|Local > Remote Rsync over SSH Backup||Works using an SSH Key.|
|Scheduling Backups||Works! via Windows Task Scheduler|
|E-Mail Backup Report||Works! via Blat|
|Windows VSS||Options being tested.|
|luckyBackup snapshots||Does not work correctly. Fix coming in future release.|
- Currently recommended version. Includes rsync 3.1.0, ssh, blat (email), and vss tools/scripts.
luckyBackup Installer Package
An installer package is being developed for the Windows port but is not yet available. Please continue to use the Manual method.
First you need Cygwin installed on your computer. You can download it from http://www.cygwin.com/. Once you have downloaded the setup.exe file you need to install both rsync and openssh. Below is a walk-through of images from when I installed Cygwin.
- Run the Application, click Next.
- Select Install from Internet, click Next.
- Select install folder, click Next.
- Select temp/download folder, click Next.
- Select Connection type, click Next.
- I just selected a handful of sources, click Next.
- It's downloading, just wait..
- It might tell you this. Read it, click Ok.
- Once you get here you can select the packages to install.
- First, search for rsync using the search box, and expand Net, then click on rsync to include it.
- Now, search for ssh using the search box, and expand Net, then click on ssh to include it. Click Next.
- It will tell you about dependencies, click Next.
- It's downloading, just wait.
- Select your options, click Finish.
- If you added desktop icons, you should see them on your desktop. You're done with the Cygwin install.
There's not a whole lot to installing luckybackup itself. Just download and uncompress the files into any folder you choose. There's no installer so you will need to create a shortcut if necessary on your desktop yourself.
I'll work on this more as I have time.
Create SSH Key for passwordless SSH with cygwin
luckyBackup doesn't have a prompt to enter SSH passwords so you need to use a SSH key instead. Below is a very quick and basic guide to create a SSH key. I'm sure more advanced options exist :)
- Open the “Cygwin Terminal” by default this is located c:\cygwin\Cygwin.bat
- Create a ssh key
ssh-keygen -v -t rsa
- Press enter a few times (I think 3) until it completes, accepting all defaults.
This will create a key in the /home/username/.ssh/ folder of your cygwin environment and will be used by default when using ssh to connect to a system. You'll need to copy the id_rsa.pub file to the server you want luckyBackup to backup to and from there add it to your users keyfile. This might vary from system to system but here's an example adding it to a FreeBSD system.
- From the Cygwin environment you can use “scp” to copy the file to the target system.
scp ~/.ssh/id_rsa.pub user@host:key.pub
- Then, SSH into the target system and execute
mkdir -p ~/.ssh cat ~/key.pub >> ~/.ssh/authorized_keys
Scheduling Backup's via Windows Task Scheduler
On *nix platforms luckyBackup relies on the systems crontab scheduler. Since that does not exist on Windows the closest (Windows based) option is to use the Windows Task Scheduler. Unfortantly luckyBackup cannot currently configure the schedule for you so it must be done manually. Optionally you could configure crontab as a server through cygwin but I haven't had time to test and write instructions for that yet.
- To open the Windows Task Scheduler you can Click the start menu and type “Task Scheduler” in the quick search box. Then select the Task Scheduler from the results pane.
- Click on the “Task Scheduler Library” in the left pane window.
- (Optionally) right-click the “Task Scheduler Library and click “New Folder””
- Enter “luckyBackup” or another descriptive name. Then click “OK”
- Now click on and select the “luckyBackup” folder (or whatever you named it) from the tree.
- On the right side within the Actions pane click on “Create Task” or you may right-click on a folder tree item on the left pane (such as the luckyBackup folder) and click on “Create Task”
- Fill out the Name and Description boxes with anything that properly describes the backup task for you.
- (Optionally) Click on “Change User or Group” to have the task run as a different user.
- Select the option “Run whether user is logged on or not”
- Select the option “Run with highest privileges”
- Then click on the “Triggers” tab at the top of the Create Task window.
- Click on “New”
- Adjust the settings to define the schedule for the task. I selected “Daily” and a start time of 8:00:00 PM
- Click on “OK”
- Then click on the “Actions” tab at the top of the Create Task window.
- Click on “New”
- Select “Start a program” from the Action dropdown list.
- Enter the path to luckyBackup or click the “Browse” button to select the luckybackup.exe file.
- Enter the path to the luckyBackup profile to execute in the “Add arguments” box which should be similar to the below example.
- Click “OK”
- You may open the “Conditions” or “Settings” tabs and adjust any settings however for my example I left them at their default values.
- Click “OK” at the Create Task page to finish creating the task.
Windows Server 2003
- To open the Windows Task Scheduler,
- click on the Start Menu
- click on the Control Panel,
- click on Scheduled Tasks
- click on Add Scheduled Task
- On the first Scheduled Task Wizard page click Next
- Next, click on Browse and browse to and select the luckybackup.exe file.
- Define a task name and select from the schedule options. Then click Next
- I set the task name to “System Backup” and selected “Daily” for this example.
- Select a start time for the task and adjust any additional schedule options. Then click Next
- Enter a useraccount and password that will be used with running the task. Be sure to supply an account with permission to access all files you intend to backup. Then click Next
- Check the Open advanced properties for this task when I click Finish checkbox. Then click Finish
- On the first Task tab of the System Backup window you can add the required arguments to the Run field which should be similar to the below:
- drive:\path\to\luckybackup.exe “c:\Users\username\.luckyBackup\profiles\default.profile”
- Click OK to finish creating the task.
Windows Server 2008 R2
- Thanks Valerio
* At this point it only misses to close the program after the backup (it will open a new windows for each backup). If it was linux I would use pkill in 'Also execute/after' but, on windows, I don't think it's possible without getting crazy! What about adding a flag: 'Close luckybackup at the end'?
Sending E-Mail's from Luckybackup
You can configure luckybackup to send e-mails via any command-line e-mail program. The windows version of luckyBackup includes a command-line tool for sending e-mail called “Blat”.
You can configure the command luckybackup executes when sending an email from the “Profile” menu then select “Email”.
“Blat is a Windows (32 & 64 bit) command line utility that sends eMail using SMTP or post to usenet using NNTP” that has been around for a pretty long time. It's a quick an easy solution to sending automated e-mails on Windows and works perfectly with luckyBackup.
Blat is now included in the windows installer for luckyBackup. It should be located within the sub-folder “blat” of the main luckyBackup installation folder.
First visit http://sourceforge.net/projects/blat/files/ to download Blat. I used http://sourceforge.net/projects/blat/files/Blat%20Full%20Version/64%20bit%20versions/blat307_64.full.zip/download for my testing.
Blat doesn't have an installer and it's what you could call a “portable” tool. Simply uncompress the downloaded file and copy it to a location of your preference. If you're unsure you can copy/move the contents of the “full” folder into your luckyBackup folder. Another option is to create a folder named “Blat” somewhere on your system and copy/move the files there instead.
You should have the following files:
- Open luckyBackup
- Click on the Profile menu option
- Click on the Email menu option
- In the Command box enter the path/file of the blat executable and these parameters.
c:\Blat\blat.exe - -f %f -to %t -s %s -server %v -attach %l -body %b
- Fill out the from, to, subject, and smtp server fields on the luckyBackup form.
- Note: You must have an SMTP server that will accept and deliver the e-mail.
- You can use parameters -u and -pw to use SMTP AUTH with Blat
- You can specify the SMTP port to use with the format smtp.domain.ltd:port
- Click Test and after a couple of seconds you should get a dialog box with the command output and hopefully an e-mail.
For more information please reference the blat website. It has documentation and many examples that you can use for more advanced configurations of blat.
Being able to backup open/system files is sometimes very essential. Windows has support for Volume Shadow Copy service which is similar to filesystem snapshots on *nix platforms. However neither rsync or luckyBackup have built in support to utilize Windows VSS. There are a few ways to get this to work and currently the best and only simi-supported option is via pre/post scripts (see below).
NOTE: The Pre/Post scripts must be located in a folder not using any spaces in the name due to an issue with luckyBackup. This is a temporary issue and will be resolved. The included example scripts must be modified accordingly. –
You can create batch scripts that luckyBackup will execute before and after a backup. With this feature you can create scripts to create a shadow copy and expose it to a drive letter that luckBackup can then use when running the backup.
This isn't the most elegant solution but it does work. Example scripts are included with the windows luckybackup distrubution within a sub-folder “vss” of the main luckybackup installation folder.
You will need to modify these scripts to suit your needs and environment. They are configured for a Windows 7 environment and to create a shadow copy of drive C: then expose it to drive B:
So, you must modify the drive letters if you want to create a shadow copy of a different drive or expose that copy to a different drive letter. You must also change the vshadow command to the correct version if you're not using Windows7/2008.
Once you've done this. You can create a normal task within luckyBackup. Verify it works correctly then modify the task. Under Advanced then Also Execute you must add the pre-vss.cmd to the Before category then add the post-vss.cmd to the After category.
Then, you must change the Source path to use the B: (or whatever drive letter the shadow copy is exposed to) drive. This drive will only exist while the shadow copy is exposed and that only happens after the task begins execution. Because of that, you must also check the “by-pass WARNING” checkbox on the Advanced then Also Execute configuration page.
Now, when you run this task the pre-cmd.cmd will create and expose a shadow copy of your drive then the normal task will run making a backup from the exposed shadow copy. Finally, the post-vss.cmd will remove the shadow copy.
I'll work on providing step-by-step instructions with pictures soon :)
There are patches floating the web that add VSS support to rsync and there's at least one person who's hosting a pre-built executable for windows with VSS patches.
Using this version of rsync you should be able to utilize VSS for your backups.
https://www.itefix.no/i2/content/building-rsync-and-patches-vss discussion about cwrsync-vss
You can create a custom wrapper to the rsync.exe command to get VSS support.
Build luckyBackup on Windows
If you want to download the luckyBackup source and compile it yourself here are some basic instructions to get you started. This is what I use and there may be other (maybe ever better) methods. Please let me know if you notice an error or are aware of a better option
notice : this section is a work in progress :)
Install MinGW 4.4
MinGW 4.4 needs to be installed on your computer first. Finding a copy of it has become a bit harder lately so I'm keeping a copy availble here on my website. You can download it here if you wish. Just extract the files into C:\MinGW or another path if you wish to use non-default locations for things.
Install Qt 4.8.5
Pretty straight forward process. Download Qt 4.8.5 from https://qt-project.org/ then run the installer. I've just gone with the default folder paths.
Install QT Creator 3.0
As with Qt itself this is pretty easy. Just download it from the Qt Project site and run the installer.
Download the luckyBackup source code from the main website http://luckybackup.sourceforge.net/
You can extract the source code to any work folder you want to use.
Add Project to QT Creator
It may be a good idea to test your build to make sure luckyBackup behaves correctly. I'm going to try and list a set of tests below that I'll follow myself with each build I release.
|Start luckBackup console-mode from Windows|
|Start luckyBackup GUI from Windows|
|Start luckBackup console-mode from Cygwin|
|Start luckyBackup from within Cygwin|
|Local to Local Backup.|
|Local to Remote Backup.|
|Local to Remote Backup over SSH.|
Errors & Notes
libpng warning: Duplicate iCCP chunk
'uname' is not recognized as an internal or external command, operable program or batch file.
Links for Reference
Here's a few links to some reference information I might need in the future while trying to improve luckyb on windows.
This space holds notes and information that may be incomplete, inaccurate, and unsafe to your health.
Build the rsync-wrapper
There's a contributed rsync-wrapper we received that adds VSS support to luckyb. It's currently not available as a pre-built download like 0.4.7 is and may be included with 0.4.8 release. To build it you need Python and py2exe installed.
I installed version 2.7.3 http://www.python.org/download/releases/2.7.3/
via this download http://www.python.org/ftp/python/2.7.3/python-2.7.3.amd64.msi 32 bit version is http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi
Run the downloaded file
- Select “Install for all users” then click Next
- Pick installation folder (I use the default) then click Next
- Select/Deselect Python features (I used defaults) then click Next
- A User Account Control (UAC) message might pop up asking for permission. Allow it.
- Click Finish when the installer completes.
Download py2exe from sourceforge http://sourceforge.net/project/showfiles.php?group_id=15583
I installed version 0.6.9 http://sourceforge.net/projects/py2exe/files/py2exe/0.6.9/ via the download http://sourceforge.net/projects/py2exe/files/py2exe/0.6.9/py2exe-0.6.9.win64-py2.7.amd64.exe/download for 32 bit get http://sourceforge.net/projects/py2exe/files/py2exe/0.6.9/py2exe-0.6.9.win32-py2.7.exe/download
- Run the installation package
- First page, click next.
- Next page, select the Python 2.7 install (was already selected for me) then click Next.
- Next page, just click Next :)
- One it completes click on Finish.
cx_freeze seems to be more active. Maybe we should try that? http://cx-freeze.sourceforge.net/
Another option is pyinstaller to look at http://www.pyinstaller.org/
here's a list http://www.freehackers.org/Packaging_a_python_program
- Open Command Prompt Window (start → run → cmd.exe or for Vista/7 start → cmd.exe)
- Add Python to your path with
- Change to whatever folder you are keeping the rsync-wrapper code.
- Build the wrapper
python setup.py py2exe
A dozen or so lines will fly by and it will give you a notice about required .DLL files. The .exe file should now be compiled and executable on your system. The compiled version should be in a subfolder called “dist” along with a few other files.