Introducing duplicity-nfs-backup, or How to Use duplicity-backup Safely with NFS/CIFS Shares

After completing nfs_automount script a bit over a week ago, I soon realized rdiff-backup I had planned to use with the now-nearly-guaranteed-to-be-online NFS shares would not work. I then turned to my other favorite *NIX server backup solution, duplicity with wrapper script. It utilizes gzip-based archives, which works much better with NFS/CIFS shares. Besides the other odd problems with rdiff-backup and NFS, it resolves the more obvious issue with conflicting users/permissions between the client and the NFS share host as duplicity doesn’t maintain a direct mirrored copy of the files being backed up.

The only problem was that since duplicity creates incrementals, and I generally like to keep backups around for several months, the incrementals are really never needed beyond couple of weeks. Beyond that in my applications the day-by-day backups are overkill, and should be pruned. Duplicity provides an option to do so (“remove-all-inc-of-but-n-full”), but hadn’t implemented it, so I first contributed a patch to zertrin’s project. Then I proceeded to write a wrapper for the wrapper to add the extra pre-backup checks, and duplicity-nfs-backup was born.

So what is duplicity-nfs-backup? It is a wrapper script designed to ensure that an NFS/CIFS-mounted target directory is indeed accessible before commencing with backup. While can be used to back up to a variety of mediums (ftp, rsync, sftp, local file…), duplicity-nfs-backup is specifically intended to be used with NFS/CIFS shares as backup targets.

The script that was the impetus for writing duplicity-nfs-backup, nfs_automount, attempts to keep the NFS shares online at all times, but the client system can’t always help with such situations. What if the target system becomes unreachable due to a network problem? Or what if a disk, or a filesystem mount fails on the target while the share is still available? In any of these cases duplicity-backup/duplicity would back up into an empty mountpoint. duplicity-nfs-backup adds the necessary checks to ensure that this won’t happen, and it also issues log/syslog warnings when a backup fails due to a share that has gone M.I.A.

I mentioned earlier that duplicity-nfs-backup is “a wrapper for the wrapper.” Paraphrasing zertrin, it is important to note that duplicity-nfs-backup IS NEITHER duplicity, NOR is it duplicity-backup! It is only a wrapper script for duplicity-backup, also written in bash.

This means that you will need to install and configure duplicity and before you can utilize duplicity-nfs-backup. I also recommend that you would make use of nfs_automount as it significantly improves the chances that the NFS target share will be online when duplicity-nfs-backup attempts to access it.

This script is intended to be run from crontab. duplicity-nfs-backup takes no arguments, simply set the configuration parameters in duplicity-nfs-backup.conf and you’re done!

Like nfs_automount, duplicity-nfs-backup is also distributed under MIT license.

Clone or download duplicity-nfs-backup from my GitHub repository, and let me know if you come across any problems (or also if it works fantastically and saves the day! :)). Pull requests are always welcome.

Visio 2013 Connector Text Block Background Color

I recently switched from Visio 2010 to Visio 2013, and while I quite enjoy the fluidity of 2013’s UI, some of the changes have had me run in circles before finding the 2013 equivalent for 2010 features I already knew. Here’s one of them:

Working on a diagram of our DNS server setup I wanted to adjust the background color of the connector text block. There are many good tutorials on the web on how to accomplish the same in Visio 2010… but in Visio 2013 the “Format” context menu option is gone, and there’s “Format Shape” which opens the Format Shape sidebar which has no options to adjust the text block’s background color.

A text block with the default white background.

A text block with the default white background.

Finally after clicking around for some time I found the new hiding place of the Text Block options. Here’s how:

First left click on the connector to select it; the green and yellow selector indicators show up:


Then click on the little symbol in the lower right corner of Home > Font, or Home > Paragraph area in the ribbon bar. This opens up the text dialog (with ‘Font’ or ‘Paragraph’ tab selected, depending on which area you clicked). Select the “Text Block” tab, and you’ll see “Text background” options:


Now the earlier tutorials I mentioned apply. If you select “None” for the background, or set its Transparency to 100%, you’ll get an undesirable effect:


The better option is to use some color picker tool like Nattyware’s free pixie (or one of many other alternatives) to sample the color surrounding the text block and then set the Solid color value to match (with Transparency set to 0%). Or, if you use standard colors in your diagram, select the same standard color for the text block background. Now it looks a lot better:

The little arrow symbols in the lower right corners of various Ribbon areas are good to get to know – lots of options hide behind them! For example, the arrow symbols in Design > Page Setup, or View > Visual Aids open dialogs to many everyday workflow options that are frequently needed.

Finally, couple of other Visio tips. A blog post Work Faster With Our Visio Keyboard Shortcuts by “Visio Guy” outlines the navigation shortcuts that also work with Visio 2013. Mastering and memorizing them makes Visio use a pleasure!

Another task that I frequently run into while using Visio is the need to replace an object, say, a square with another such as a diamond, for example. Visio does not allow you to do this natively. You’ll have to delete the object, reconnect all the connectors, etc. If you have many objects to replace, it translates to a lot of work. Then I found Paul Herber’s Super Utilities and Tools for Visio. Among its many features there is “Shape substitute” command that does exactly that – very handy!

Marvell 88E8056 and ESXi 4.1

So I have an older development/experimental server that runs couple of VMs on ESXi 4.1. The server’s motherboard (ASUS P5BV-C/4L) is from an old workstation, and it has integrated quad NICs which would be nice to be able to use.. except that the default build of ESXi 4.1 doesn’t see them (even though ESXi 4.1 technically supports Marvell 88E8056 NICs).

There are several pages that discuss the issue extensively, and have a lot of good information on them. Yet another page has a quick low down on how to get the driver properly installed.

However, having not worked on ESXi CLI for some time I had forgotten, for example, that busybox that ESXi uses wipes the root files on every reboot. After a while I recalled (from an old note) that to save changes to the /etc/vmware/ I would need to execute /sbin/ 0 /bootbank/ after making the edits. But even that was unecessary.

One sentence on the brief recap page, would have saved me couple of hours tonight. So here it is: »Just upload the attached oem.tgz into /bootbank folder with scp, then reboot, and you’re done!» And when you do that, you are done – the pre-prepared oem.tgz works perfectly!

Yes, had I known, I would’ve known, but I didn’t. :) Hopefully this saves time for someone else!

Adding graphics, comments to PDFs

I needed to fill out a PDF document today, date it, and sign it. It took me a good hour to accomplish the task as while the latest incarnation of Acrobat has custom stamp feature, annotated text doesn’t print by default (I also wanted to avoid having to print out the document only to scan it back in). In fact, I found no way to print text annotations. Whether “Documents and Stamps” was selected in the Print properties or not, the text annotations would remain missing from the printout. It should not be this difficult to add a text box to a PDF document and then flatten it to be part of the document, and not an annotation per se.

After some more Googling later I happened on this page that outlines a simple way to add “flatten” options to the Acrobat document menu. The associated script to be placed in “Program Files/Adobe/Acrobat 9.0/Acrobat/Javascripts/” folder (the script works with older Acrobat versions, too, as the mentioned instructions are for Acrobat 7.0) is just two lines long:

With the above script installed, the task was a snap: I added my signature from a transparent PNG as a custom stamp, added the text annotations, and then flattened the document. Done! Now the annotations print out as they should (whether or not “Documents and Stamps” is selected in the Print properties as now the annotations are part of the ‘base’ document). I can’t imagine why Adobe doesn’t include “flatten” as a default feature!

End of C·O·M·O·D·O Firewall (only)

For few years now I’ve used the lightweight C·O·M·O·D·O firewall in conjunction with ESET nod32 AntiVirus. Both are lightweight and effective. Or were. ESET nod32 is still getting better with every consecutive release (the recently released 4.x, for instance, it lighter on system resources than its predecessor). But C·O·M·O·D·O just merged the “Personal Firewall” with their AntiVirus product hence effectively discontinuing the separate, lightweight and easy-to-configure firewall. Time to part ways — I’m not willing to use C·O·M·O·D·O’s A/V.

ZoneAlarm Pro may be the next good choice.

Dumping Schedule Wizard for VisualCron

For several years I’ve used Schedule Wizard scheduler for Windows Server task scheduling.  For a long time I haven’t been totally happy with its stability (or lack of).  During any given year there has generally been a handful of incidents where I notice the tasks haven’t been running, and often the problem could be traced back to Schedule Wizard. For example, forgetting to close the tray icon and the clip-board manager (if running) before installing an upgrade will result in a broken installation. It won’t tell it to you – it just won’t run. And when a new version has been properly installed, there’re often issues about getting the service stable again (so that it’ll actually execute the tasks on schedule).

After the most recent upgrade I could not get the service running again so that the tasks would be run. The service starts ok, but then nothing happens. I reinstalled half a dozen times, tried to run the service as the Local System, admin, and as a special user with sufficient privileges, to no avail. Tasks run fine using the interactive scheduler, but on a server that won’t do.

So once again I started to review the other possible schedulers out there. I had done this several times before, always returning to Schedule Wizard as, for example, I found AutoMate 7 too heavy and too expensive (I’m always dubious of software packages that don’t tell their price on the web site upfront, but instead ask you to “request for a quote” — it usually means that the software is overpriced and the sales people want to be able to talk you in buying it).  Automize, on the other hand, uses Java (not JavaScript) for task coding, and I don’t write Java well. Then there’s Robotask, which looks cool, but it doesn’t run natively as a service on Windows Servers (one could try to run it under FireDaemon or AlwaysUp, but I really think a scheduler should have a native service mode).  There’s of course WinCron but while I use cron (or bcron) with Unix, for some reason it feels out of place in Windows.

But on different passes at finding the windows task schedulers out in the wild I had missed two products: VisualCron and Macro Scheduler Pro.  Both are very clean, stable, moderately priced, and they just work! For most operations VisualCron is just perfect (running programs, external scripts, etc.) while Macro Scheduler Pro reminds a bit of AutoMate in that it’s “more than a scheduler” – the scheduling function is part of it, but overall it’s a workflow automation software.

FTP Client Update

Last fall I wrote about various (S)FTP(ES) clients, and in that article mentioned that secure authentication with popular open source FTP server pureFTPd did not work with VanDyke Software’s SecureFX FTP client as it lacks the option to use unencrypted data channel – a requirement with pureFTPd. VanDyke Software is now working on a version 6.3 that will introduce that option; the new version should see daylight (in production) sometime toward the end of this year.

On a related note, I’ve been recently using for (S)FTP(ES) connections the winner of my FTP client comparison in the fall, Ipswitch WS_FTP Pro.  Ipswitch just recently released the version 12 of the software.  A quick run-down between the SecureFX and WS_FTP Pro quickly reveals that WS_FTP Pro gives more fine-grained control over many operations, and that the GUI of the product is more up-to-date than that of SecureFX (see screen shots below). While the SecureFX interface is rather utilitarian and is in need of an update, it has the benefit of being able to share the session list with VanDyke’s excellent terminal/SSH client SecureCRT. So perhaps you won’t need the extra features/options of WS_FTP Pro, and find the singular session list handy, then SecureFX is certainly worth a look. On the other hand, if you’re just looking for the best FTP client, I’d be inclined to recommend WS_FTP Pro at this time. The price tags of the products likely reflect the differences in features and looks: SecureFTP is priced at $59.95 compared to the $89.95 price-tag of WS_FTP Pro.


Ipswitch WS_FTP Pro