Skip to main content

Ralsina.Me — Roberto Alsina's website

Posts about sysadmin (old posts, page 5)

Bash does thing I never suspected.

Try this and be amazed:

$ cat < /dev/tcp/gsmtp163.google.com/25
220 mx.google.com ESMTP 12si345086nzn

Be hon­est: did you know bash could do that? I did­n't un­til find­ing it in the man page

Now try this and be amazed it does­n't work (yes, it's in the doc­s):

$ cat /dev/tcp/gsmtp163.google.com/25
cat: /dev/tcp/gsmtp163.google.com/25: No such file or directory

And re­mem­ber, on unix ev­ery­thing is a file, but maybe that file is on­ly there in some very spe­cif­ic cir­cun­stances.

UP­DATE: There is a chance this will not work in your dis­tro, specif­i­cal­ly De­bian.

Windows: my eXPerience

Can you be a com­put­er con­sul­tant and gen­er­al­ly a com­put­er guy with­out ev­er in­stalling win­dows?

I man­aged for over 12 years... un­til this week.

Dropping BIND, at least a little

One of my cus­tomers has about 15000 email ac­counts.

I use ex­ten­sive­ly RBLs to keep the un­want­ed con­nec­tions to a min­i­mum, and many oth­er spam de­tec­tion tech­niques, many of which in­volve DNS lookup­s. Plus all the lookups caused by the email of 15000 user­s.

It turns out that ac­cord­ing to our IS­P, we were one of the top ten DNS users in their net­work, and we were killing their server­s.

That got fixed, but it seems late­ly we were killing our own DNS server­s, too.

BIND would stop an­swer­ing to lookups ev­ery once in a while and had to be restart­ed. Since that was an­noy­ing, and the soft­ware was up to date, and there seemed to be noth­ing wrong with the con­fig­u­ra­tion, I did what I could think of, and start­ed look­ing for an al­ter­na­tive.

Pow­erDNS's re­cur­sor works well, is lighter, it's eas­ier, and works like a charm (but you re­al­ly should use their mul­ti­-­for­ward patch).

So, thumbs up for Pow­erDNS, and I am still keep­ing BIND for our au­thor­i­ta­tive zones, at least for a while, since that part seems to still be work­ing cor­rect­ly.

Geek challenge: Backup this thing!

Here's the sce­nar­i­o:

  • A Lin­ux+Sam­­ba serv­er with 40GB of da­­ta.

  • A SM­B-on­­ly small stor­age serv­er.

Your mis­sion? Back­up the thing. You should do full back­up­s, and keep the last three.

In an­oth­er age, I would have cob­bled a 10-­line script us­ing tar (and split, see be­low) and be done with it. But now I want to use back­up soft­ware.

So, I tried, and I ran in­to the fol­low­ing lim­i­ta­tion­s:

  1. 2GB file­­size lim­it on the stor­age serv­er. Have no idea why, as­­sume can't fix it.

  2. Weird uni­­code char­ac­ters in file­­names. There must be some en­­cod­ing is­­sue, but when a Win­­dows client saves a file with ac­­cen­t­ed char­ac­ter­s, the clients see it all right. On the server, though, they are weird-look­ing. This is enough to make mc un­able to delete some fold­er­s, for ex­am­­ple.

So far I have tried:

  1. rdif­f-back­­up: breaks with the uni­­code chars.

  2. flexback­­up: breaks with file­­size lim­it

  3. rsync: breaks with the uni­­code chars

  4. syn­bax: us­ing rsync back­­end, see above. Us­ing tar back­­end, breaks with file­­size lim­it.

Here's what I wan­t:

A sim­ple back­up soft­ware, where I can tell it "take this, back it there, keep last three back­up­s, do it in files small­er than 2G­B, give me a re­port".

Bonus points if restor­ing it is doable from win­dows.

Any sug­ges­tion­s?


Contents © 2000-2024 Roberto Alsina