Backup Windows files into a Ubuntu file server via rsync

I have a Linux file server on Ubuntu 8.10 (Intrepid Ibex) running a rsync daemon, and a Windows server running a freeware rsync GUI called DeltaCopy. I wanted an automated, incremental backup every weekend.

Configuring the Ubuntu machine is pretty straightforward. Install and configure rsync and xinetd

There are a couple of changes from the rsyncd.conf you get from the URL above, mainly to avoid permission related problems when trying to rsync from a Windows machine. Here is my complete rsyncd.conf

uid = backups
gid = nogroup
use chroot = yes 
max connections = 5 
pid file = /var/run/rsyncd.pid
log file = /var/log/rsync.log
incoming chmod = Dg=s,Dug=rwx,Do-rwx,Fug=rw,Fo-rwx

[wbackups]
        path = /home/backups/wserver
        comment = Backups from wserver
        read only = false
        auth users = backups
        secrets file = /etc/rsyncd.secrets
        hosts allow = 192.168.1.1

Changes to note from the Ubuntu Wiki example is the “incoming chmod” line and the “auth users” line. I created a separate user called “backups” and store everything under /home/backups. Next, I notified logrotate about the new log being created. To do this, create a file /etc/logrotate.d/rsync with the following:

/var/log/rsync.log {
       weekly
       rotate 4
       compress
       notifempty
       missingok
}

And that is about all you need to do on Ubuntu.

On Windows:

  1. Install DeltaCopy
  2. Run the DeltaCopy Client, point it to the Ubuntu machine
  3. For “Virtual Directory”, my setting was wbackups, defined in the configuration file above
  4. Authenticate as the backups user you created
  1. Set your rsync options

The rest should be straightforward. The DeltaCopy GUI also allows you to automatically schedule backups.

Optimizing Code for Speed

Optimization of code is the term that was applied to a process in which a code is tuned to be better in some respects: either speed, memory consumption, Input/Output (disk read and writes or network reads and writes), etc. In Mathematics, Optimization means a process in which one finds the values with the best performance. In Computing where programs are very complex, usually optimizing for speed in the mathematical sense is impossible. Instead the term has come to mean just advancing in the direction of better performance in one or more respects.

This document will focus on optimizing code to run faster. However, as you will see later, doing this may involve having to optimize the code in a different aspect. Furthermore, often when programmers are trying to optimize one aspect of a program, they are doing so in order to increase speed.

Read more

50 Extremely Useful PHP Tools

PHP is one of the most widely used open-source server-side scripting languages that exist today. With over 20 million indexed domains using PHP, including major websites like Facebook, Digg and WordPress, there are good reasons why many Web developers prefer it to other server-side scripting languages, such as Python and Ruby.

This post presents 50 useful PHP tools that can significantly improve your programming workflow. Among other things, you’ll find a plethora of libraries and classes that aid in debugging, testing, profiling and code-authoring in PHP.

Link

World Community Grid/BOINC

World Community Grid’s mission is to create the largest public computing grid benefiting humanity. Our work is built on the belief that technological innovation combined with visionary scientific research and large-scale volunteerism can change our world for the better. Our success depends on individuals – like you – collectively contributing their unused computer time to this not-for-profit endeavor.

To join, download BOINC , install and register with World Community Grid. You can also choose other projects. A list of projects is available here or here

10 programming languages worth checking out

If you program for fun or profit, chances are that you know C, C++, Java, PHP, Perl, Python or Ruby. These programming languages are all widely known, and, to a different degree, used in commercial applications. At least some of them can safely be considered mainstream, even if that word has become so overused and misused that has almost lost its original meaning, if it ever had one. If you are earning your living by coding, it’s often one of these languages that pays the bills. Nevertheless, true hackers frequently meander in other directions, exploring and discovering different paradigms and methodologies, sometimes to the most esoteric extremes.

Even if you’re particularly devoted to one of the languages mentioned above, it is normal to be curious about what else is out there. As the end of the year approaches, I find myself thinking about learning – or at least become acquainted with – some less known, more experimental, programming languages. I was originally planning on learning another programming language as a New Year’s Resolution, which is quite common among programmers. The most difficult task turned out to be choosing a particular language: there are so many out there which makes it very hard to decide.

Read more

25 Free Computer Science Books

As a computer scientist I’m always looking to improve my knowledge of the subject. There are lots of great sources of information available online, but nothing really beats the depth of knowledge that you can find in a book. It is possible to get the best of both worlds though, as many books are now available online in full, and free of charge!

Below is a selection of 25 of the best free computer science books that I’ve found online, with a brief description of each one.

Read more

Delegates, Anonymous Methods and Lambda Expressions

Like generics, delegates are one of those features that developers use without really understanding. Initially this wasn’t really a problem since delegates were reserved for fairly specific purposes: implementing callbacks and as the building-block for events (amongst a few other edge cases). However, each version of .NET has seen delegates evolve, first with the introduction of anonymous methods in 2.0 and now with lambda expressions in C# 3.0. With each evolution, delegates have become less of an specific pattern and more of a general purpose tool. In fact, most libraries written specifically for .NET 3.5 are likely to make heavy use of lambda expressions. As always, our concern isn’t just about understanding the code that we use, but also about enriching our own toolset. Seven years ago it wouldn’t have been abnormal to see even a complex system make little (or no) us of delegates (except for using the events of built-in controls). Today, however, even the simplest systems heavily relies on them.

Read more

8 Great Alternative Desktop Managers For Linux

Most of the Linux users should be familiar with Gnome and KDE since both of them are the most commonly used desktop managers in the various Linux distros. Now, if you are using an old PC with low hardware specs, you might find that the above two desktop environments are too heavy for your computer to handle.

In this case, you will have to consider using an alternative lightweight desktop manager for your Linux. Here are 8 of the best lightweight desktop managers that I personally use and recommend.

Read more






www.flickr.com