I wrote this backup script in Python to do backups on some of the servers I maintain.
Features
- simple & quick to configure & install
- full & incremental backups
- configurable backup directories
- configurable full backup dates
- backups in tar format, no special software for restores
- email notification of problems
- backup files to any valid path (nfs, smb, usb drive, etc...)
Requirements
- python
- system supporting the tar command (linux, unix, cygwin, etc...)
For installation instructions or more information about the scripts check out the included README file. Scripts are released under the LGPL.
You can download them from here.
Dan
** UPDATE **
I've updated the link to a newer version (1.0.1). The original version was written to write backups to an external drive, so it assumed that the drive needed to be mounted first. If the drive was already mounted it would remount it. So I've added an option where you can now specify if the script should mount the drive first.
Friday, August 24, 2007
Sunday, July 22, 2007
Asterisk Ubuntu Feisty Fix
Starting Asterisk PBX: /usr/sbin/safe_asterisk: 108: Syntax error: Bad fd number
I ran into this issue while running Asterisk 1.2.22 on Ubuntu Feisty 7.04. It appears that the 'safe_asterisk' start-up script has an issue with it. In Ubuntu Feisty, the default shell (/bin/sh) is no longer bash, it is dash. The 'safe_asterisk' script needs to reference bash. So changing the first line from '#!/bin/sh' to '#!/bin/bash' fixes the issue.
Hope this helps someone.
I ran into this issue while running Asterisk 1.2.22 on Ubuntu Feisty 7.04. It appears that the 'safe_asterisk' start-up script has an issue with it. In Ubuntu Feisty, the default shell (/bin/sh) is no longer bash, it is dash. The 'safe_asterisk' script needs to reference bash. So changing the first line from '#!/bin/sh' to '#!/bin/bash' fixes the issue.
Hope this helps someone.
Friday, March 09, 2007
FizzBuzz Problem
This has been on digg recently and there was some talk about it recently at work.
If you are interviewing someone and need a programming question to ask, this is a good one. Any competent programmer should be able to give you a solution.
A simple solution would be to setup a loop from 1 through 100, checking for numbers that are divisible by 3, 5, or both and printing the correct output.
Since taking the simple solution is boring, here's a python solution that I came up with that is only one line long.
print "\n".join([((num % 3 == 0) and (num % 5 == 0)) and 'FizzBuzz' or (num % 3 == 0) and 'Fizz' or (num % 5 == 0) and 'Buzz' or str(num) for num in range(1, 101)])
Anyway, if you think you have a cool solution post it here.
Dan
If you are interviewing someone and need a programming question to ask, this is a good one. Any competent programmer should be able to give you a solution.
This puzzle is typically given to all levels of programming candidates (newbie to senior) during their interview. According to numerous people, only about 10% of the programmers can pass it (even the seniors). Can you? (hint… its actually not that hard if you figure out the key).The problem is actually simple and has a simple strait forward solution, which is what makes it such a good question to ask.
Problem:
Write a (substitute language here) program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.
A simple solution would be to setup a loop from 1 through 100, checking for numbers that are divisible by 3, 5, or both and printing the correct output.
Since taking the simple solution is boring, here's a python solution that I came up with that is only one line long.
print "\n".join([((num % 3 == 0) and (num % 5 == 0)) and 'FizzBuzz' or (num % 3 == 0) and 'Fizz' or (num % 5 == 0) and 'Buzz' or str(num) for num in range(1, 101)])
Anyway, if you think you have a cool solution post it here.
Dan
Friday, January 19, 2007
CodeMash 2007 Follow Up
Here's my wrap up on CodeMash 2007.
First, let me just say, props to the individuals (organizers, event staff, and presenters) who took part in the event. Also thanks to the sponsors who paid the bulk of the money that made the event happen. I had a blast and learned a ton.
In case you couldn't go, I was able to record the presentations that I went to. The quality isn't great, but you can hear what is being said without too much difficulty.
Here are the links.
Day 1
Day 2
I would highly recommend listening to "The Productive Programmer", I found it very informative.
Also, If anyone has or knows where to get recordings of the other presentations, please let me know. There were too many good presentations to attend all of them.
Lastly, I'm posting the recording on my own, and am assuming that the presenters will not mind. If you, the presenter, do not want them posted here please contact me and I will remove them.
Enjoy,
Dan
First, let me just say, props to the individuals (organizers, event staff, and presenters) who took part in the event. Also thanks to the sponsors who paid the bulk of the money that made the event happen. I had a blast and learned a ton.
In case you couldn't go, I was able to record the presentations that I went to. The quality isn't great, but you can hear what is being said without too much difficulty.
Here are the links.
Day 1
- Keynote - Domain-Specific Languages and Their Roles in the Evolution of the Programming Paradigm presented by Neal Ford.
- Maximum Velocity with MySQL presented by Jay Pipes
- The End of Tier-Based Architecture presented by Owen Taylor
- KeyNote - The World is Dynamic presented by Bruce Eckel
Day 2
- SOA: Next Wave of Enterprise Development or Return of the Son of CORBA? presented by Neal Ford
- Selenium Radically Simplified Testing Websites presented by Eric Pugh
- The Productive Programmer presented by Neal Ford
- Improve Your Testing with Open Source Testing Tools presented by Jim Holmes.
I would highly recommend listening to "The Productive Programmer", I found it very informative.
Also, If anyone has or knows where to get recordings of the other presentations, please let me know. There were too many good presentations to attend all of them.
Lastly, I'm posting the recording on my own, and am assuming that the presenters will not mind. If you, the presenter, do not want them posted here please contact me and I will remove them.
Enjoy,
Dan
Subscribe to:
Posts (Atom)