Skip to main content

Ralsina.Me — Roberto Alsina's website

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?

What I learned at PyWeek

  1. I don't have the time for this kind of dead­­­lines any­­more. Not even one al­l-nighter? I did noth­ing on Sat­ur­­day ex­­cept re­al work and fam­i­­ly re­u­nion?

  2. It's re­al­­ly easy to write games with Python. It's most­­ly just a mat­ter of hav­ing a good game con­­cep­t. The cod­ing is the easy part.

  3. Chip­­munk is cool. Qt's graph­ic scene stuff is cool. My Chip­­munkScene is coolest ;-) I should re­­think the API but the con­­cept is killer stuff. With a lit­­tle work this thing is like LEGO!

  4. I will try again in Py­Week6.

A little further on TLB

A bit of pro­gress, al­though not much time to work on it any­more so I will prob­a­bly not make it.

Ob­jects now can do things when they are hit by oth­er kinds of things.

Ex­am­ple: If a ball hits the bot­tom of the cat­a­pult cup, the cat­a­pult shoot­s. If some­thing hits the tar­get ob­jec­t, you win the lev­el.

First pic of TLB

Not a game yet, but the en­gine is start­ing to look good.

tlb1

The ball drop­s, fol­lows both ramp­s, bounces down the stairs, hits the domi­noes, the last one falls on the piv­ot­ing ram­p, slides down and to the left, falls stand­ing and leans left, then hits the rest of the domi­noes.

PyWeek progress: the 4 hour mark

Sud­den­ly I was hav­ing a calm day at work, and Rosario is tak­ing care of the baby, so I spent a few hours on the Py­Week projec­t.

I have in­te­grat­ed Chip­munk with QGraph­ic­sS­cene.

What does it mean? That I can now...

  • Cre­ate a scene

  • Cre­ate a view on­­to that scene

  • Cre­ate bal­l­s, walls and poly­­gons as scene items

  • Watch said bal­l­s/wal­l­s/poly­­gons bounce around hap­pi­­ly un­der Chip­­munk di­rec­­tion.

For ex­am­ple, here's enough code to cre­ate a few balls a box and a stair­case:

self.scene=ChipScene()
self.ui.view.setScene(self.scene)

for x in range (0, 10):
    self.scene.addBall(x*50.0+10, 50.0, 10.)
    self.scene.addBall(x*50.0+20, 20.0, 10.)
self.scene.addWall(0., 0., 0., 500.)
self.scene.addWall(0., 500., 500., 500.)
self.scene.addWall(500., 500., 500., 0.)
self.scene.addWall(500., 0., 0., 0.)
for i in range (0, 20):
    self.scene.addWall(i*20, 200+i*20, i*20+20, 200+i*20)
    self.scene.addWall(i*20+20, 200+i*20, i*20+20, 200+i*20+20)

self.scene.addPoly([[0, 50], [0, 100], [100, 100], [100, 50], [0, 50]])

I de­clare that nifty.


Contents © 2000-2020 Roberto Alsina