1

So I've setup a backup system for my notebook. Using Rsync, I am able to backup specific folders to my Ubuntu Home Server by executing a batch file.

My question is about the possibility of automating the sync process. The catch is, I want my laptop to begin the syncing process if and only if:

  1. I connect to a specific Network through a Wireless Access Point. (I access my home network through WiFi when I'm on my notebook. I want to let the backup process commence strictly only upon connecting to this one home network.)

  2. The Ubuntu Home Server is online. (Since the backup is automated it would be great if the backup would only be allowed to commence if and only if the Ubuntu Home Server has been uniquely identified - perhaps through its MAC?)

Not really that urgent, but I would be happy to hear from the experts here.

BinaryMisfit
  • 20,879

2 Answers2

1

Netprofiles can help you with the first part.

Features

  • Save your network settings as profiles.
  • Automatically activate wireless profiles when specified wireless connections are detected. (XP only)
  • Change IP Address, Subnet Mask, Default Gateway, Primary and Secondary DNS Servers, WINS Server, and DHCP settings with the click of a button.
  • Specifiy different mapped drives for each profile.
  • Change your default printer based on which profile you're currently using.
  • Automatically change your profile via program shortcuts created with Net Profiles.
  • Change the default homepage for Internet Explorer, Firefox, and Opera.
  • Proxy settings for Internet Explorer, Firefox, and Opera.
  • Run a user-defined list of programs when a profile is activated.
  • Maintain seperate desktop wallper for each profile.
  • Change screen resolutions and color quality when profiles are activated.
  • Can be easily translated into other languages using the enclosed XML language file.

I'd recommend using something other than batch for the second part, as it would be easier to control logic. Something like Perl's Net::Ping could help you.

1

You could turn the problem on its head by having the Ubuntu server periodically ping for the Windows computer. If it finds it, it initiates a backup over Samba or something. You could configure this using BackupPC.

Edit: I'll elaborate on how BackupPC works. In your case, you'll be running BackupPC on your Ubuntu home server. BackupPC runs as a daemon, and periodically it will try to connect to your Windows computer via Samba. If it can establish a connection, it will copy all the folders that you configured it to back up from the Windows machine into its backup directory (and then it will do some space-saving tricks, which you mostly won't need to worry about). Then it will close the connection and wait until the next period to do it again.

The point is, once you've set this up, all you have to do is connect to your home network on a regular basis (which, presumably, is something you already do), and BackupPC will handle the scheduling of backups for you. The only thing you need to do on the Windows machine is to grant read-only file-sharing access to the Ubuntu server.