DAVROMANIAK
Le site de Cyril "Davromaniak" Lavier, sysadmin ascendant geek
A second tape, I see. Actually I don't follow.

samedi 28 décembre 2013

Zimbra mailbox backup script

Hello.

Over the last 2 weeks, I tried a Zimbra Collaboration Suite (Open Source Edition). And before going into production mode, I wanted to perform some mailbox backup/restore tests.

After some searches, I found this page on the Zimbra wiki which contains some backup/restore script. I downloaded the script written by Richardson Lima called "zimbraBackupAllAccounts.sh", then I started adapting the script to my needs.

As I finished my switch to Zimbra, I added this script in the prebackup script on my BackupPC server.

And I thought I could share this modified script, so I created a github repository and gave him a nice name. It's now called zimbashckup (for Zimbra Bash Backup).

It operates in a non-interactive way (to be launched in the cron task or by a backup system) and can perform per folder backups. Which is useful when we only want to restore a folder instead of the whole mailbox.

This script can backup the full mailbox (Briefcase contents, address book, calendar) and even the filters exported to the sieve format (thanks to Hackman61 for the idea).

However, when an object is share, only the original owner version is backed up (it's a zmmailbox limit).

For the remaining features, I think the README file is readable enough :).

The GIT repository is here : https://github.com/davromaniak/zimbashckup

Thanks !!

mardi 27 août 2013

Imapsync

Hello.

A quick article about imapsync, a great tool when we need to move emails from server to another.

This tool has switched license and it costs 50€ now. The developer asked the Debian project to remove imapsync package from its repository. Imapsync is not under a personal license (created by the developer) which permit to do whatever you want with the source code only if you bought it.

So somebody created a github repository which contains the last version.

To install it under Debian Wheezy, you need git and some perl libraries. This aptitude command will help you installing all the prerequisites (you need to launch it as root)

  • aptitude install makepasswd libmail-imapclient-perl libterm-readkey-perl git

Then, the installation :

  • As a non-privileged user :
    • git clone https://github.com/imapsync/imapsync.git
    • cd imapsync
    • mkdir dist
    • > ./dist/path_1.558.txt
  • As root or with sudo :
    • make install

The use is simple : : imapsync --host1 oldmx.domain.tld --user1 jojothefrite@domaine.tld --password1 verysecurepasswordwithalotofdifferentchartypes --host2 newmx.domaine.tld --user2 jojothefrite@domaine.tld --password2 verysecurepasswordwithalotofdifferentchartypes

On my servers, it ran at about 5 mail by second, and 8 hours were need to transfer 125000 emails. And during this operation, you can receive and read new mails on your new mailbox.

Thanks.

vendredi 16 août 2013

Use XZ with logrotate

Hello.

XZ is a compression format which I like to use, mostly for its good results when compressing text files. And I was seeking to use it with logrotate.

And it's done now with these 3 lines added in /etc/logrotate.conf :

compresscmd /usr/bin/xz
compressext .xz
uncompresscmd /usr/bin/unxz

The default compress argument is "-9", which is working with xz, so no need to edit.

In my servers, logrotate only rotates logfiles in /var/log, so this find command uncompressed GZIP files and compressed them in XZ format :

find /var/log -name "*.gz" | while read filename; do gunzip $filename && xz -vz9 ${filename%.gz}; done

On Debian, the XZ format tools are available in the xz-utils package.

That's all folks !

jeudi 27 septembre 2012

The Intriging 10 (INT10) - Week 4

Every week, I will pick 10 college football games which will feature at least one FBS program. These games won't feature powerhouse programs and the stakes will be different from games between two powerhouse programs.

I will give my opinion on every game with an ironic side. These comments will be about the game itself and/or the teams, according to the stakes of the game.

For every team, I will give the conference they are member of.

The first team is the home team

Boise State (FBS MWC) 7 - 6 BYU (FBS Independent)

First set Boise State, BYU serves. Oops, sorry this was not a Tennis match, but it was boring as hell. Even the failed 2PT conversion by BYU didn't woke me up.

Miami of Ohio (FBS MAC) 27 - 16 UMass (FBS MAC)

UMass players can be proud of their performance. They played well but were beaten by MAC title contender.

Northern Illinois (FBS MAC) 30 - 23 Kansas (FBS BIG12)

Not a big upset, as Kansas doesn't plays like an actual BIG12 team but a good win for NIU.

Idaho (FBS WAC) 37 - 40 Wyoming (FBS MWC)

The pillow fight of the week... and a surprising win for Wyoming. For Idaho, the quest for the Big Sky continues next week at UNC.

Alabama (FBS SEC) 40 - 7 FAU (FBS Sun Belt)

Yes, FAU scored a TD in this game, so their objectives are completed.

Western Kentucky (FBS Sun Belt) 42 - 17 Southern Mississippi (FBS C-USA)

This WKU is quite enjoyable to watch this year. Let's hope they win the Sun Belt and are selected to a bowl game to have some national TV exposure.

UNLV (FBS MWC) 38 - 35 Air Force (FBS MWC)

I think we can consider this UNLV win an upset, as I was sure they weren't able to win a game this season. Maybe they finally learned the correct duration for a football game :).

Tennessee (FBS SEC) 47 - 26 Akron (FBS MAC)

Akron is finally back in the business of losing games. At least, Akron's punter has the opportunity to show off his skills.

Arkansas State (FBS Sun Belt) 56 - 0 Alcorn State (FCS SWAC)

Hey, Alcorn State officials. If you want a bigger paycheck, schedule this kind of match against a BCS opponent.

All "BIG10 vs Non-BCS" matches

What the fuck is going in the BIG10 this year ? Illinois losing against Louisiana Tech, Iowa losing against Central Michigan. Wisconsin and Michigan State winning by a small margin against non-BCS opponents. Next week, conference matches are starting. We will see if this impression lasts.

See you next week !!

vendredi 21 septembre 2012

Incorporate a file in another with AWK

Hello.

Recently, I had to replace a string of characters by a text file content.

Example : I want to replace "##__youpi_tralala__##" by the content of the text file called "youpi_tralala".

I tried with sed, but it wasn't reliable, as sed tried to execute the text file content.

So I worked with my best friend AWK.

Here is the result, the script called include_file.awk :

{
	str=$0
	where=match(str,regexp)
	if (where) {
		while (("cat "file) | getline tstr > 0) {
			if (newstr == "") {
				newstr=tstr
			} else {
				newstr=newstr"\n"tstr
			}
		}
		close (tstr)
		sub(regexp,newstr,str)
	}
	print str
}

It's a beautiful AWK script, which can be launched like this : awk -v regexp="awesome regexp" -v file=/path/to/the/included/file -f include_file.awk text_file_with_the_regex

I use it in LaTeX, to debug some includes, to see if the file content or the include which is the origin of the issue.

Here is an example :

awk -v regexp="^%%__part1__%%$" -v file=includes/part1.tex -f include_file.awk document.tex | pdflatex -jobname=document

Here, the string placed in the document.tex file is "%%__part1__%%".

That's all folks :D.

mardi 18 septembre 2012

The Intriging 10 (INT10) - Week 3

Every week, I will pick 10 college football games which will feature at least one FBS program. These games won't feature powerhouse programs and the stakes will be different from games between two powerhouse programs.

I will give my opinion on every game with an ironic side. These comments will be about the game itself and/or the teams, according to the stakes of the game.

For every team, I will give the conference they are member of.

The first team is the home team

Miami (FBS ACC) 38 - 10 Bethune-Cookman (FCS MEAC)

I thought Miami would blast Bethune-Cookman, but they only win the game without any fuss.

Vanderbilt (FBS SEC) 58 - 0 Presbyterian (FCS Big South)

SQUASH !!!! I want a game between Presbyterian and Savannah State :D.

Akron (FBS MAC) 66 - 6 Morgan State (FCS MEAC)

Whether Akron played up to their level in this game whether Morgan State is a very very bad team. I think Akron players had the occasion to show up and they did it well.

Syracuse (FBS Big East) 28 - 17 Stony Brook (FCS Big South)

What !? Stony Brook is not a team from the FBS. It's a shame for Syracuse to beat them by only 11 points. Maybe next week Minnesota will win its 4th consecutive game this season.

Iowa (FBS BIG10) 27 - 16 Northern Iowa (FCS MVC)

Even if Northern Iowa is one of the big programs of the FCS, I'm still surprised by the inability of BIG10 teams to play up to their levels against Northern Iowa and record close wins.

Minnesota (FBS BIG 10) 28 - 23 Western Michigan (FBS MAC)

Yeah !! 3rd consecutive win, but it was hard. They might win against Syracuse next week but the remaining of their schedule (the BIG10 conference games) will be though.

Wisconsin (FBS BIG10) 16 - 14 Utah State (FBS WAC)

Poor poor BIG10. Wisconsin lost against Oregon State last week, and here they win by 2 points against Utah State. What's next ? Being squashed by Penn State on November 24th ? Or getting beaten by UTEP next week ? Frankly, I don't see Wisconsin as an actual power program of the BIG10 this season. Every season they fail to meet the expectations.

Wyoming (FBS MWC) 22 - 24 Cal Poly (FCS Big Sky)

I don't know what to think about Wyoming football program. Winless this year ?, I think. I even think Idaho will beat them next week (yes, the same Idaho team which was crushed by LSU). No energy, no pride, no fighting spirit and no wins at all.

Hawaii (FBS MWC) 54 - 2 Lamar (FCS Southland)

Nothing interesting in this game... Except the end. Why Hawaii special team coach thought about going for a 2 point conversion on their last TD ? Lamar returned it and scored their only 2 points of the game. This play will belong to the hall of shame this season.

Kentucky (FBS SEC) 31 - 32 Western Kentucky (FBS Sun Belt)

What an upset !!! Hopefully I didn't bet anything on this game, I would have lost anyway. This is the first WKU win against a BCS conference opponent. Let's see next week against Southern Mississippi, I'm curious to see how WKU players will perform.

See you next week !!

mercredi 12 septembre 2012

The Intriging 10 (INT10) - Week 2

Every week, I will pick 10 college football games which will feature at least one FBS program. These games won't feature powerhouse programs and the stakes will be different from games between two powerhouse programs.

I will give my opinion on every game with an ironic side. These comments will be about the game itself and/or the teams, according to the stakes of the game.

For every team, I will give the conference they are member of.

The first team is the home team

University of Texas at San Antonio (FBS WAC) 27 - 16 Texas A&M Commerce (DII Lone Star Conference)

Sean Ianno !! Sean Ianno !! Good game with 2/2 FGs (34 ad 46 yards) and 3 XP. A solid game for UTSA with 3 TD (2 rushing and 1 passing). Next week, they travel to the Georgia Dome to take on Georgia State University.

Buffalo (FBS MAC) 56 - 34 Morgan State (FCS MEAC)

Yep, this was a game between a FBS and a FCS team...

Florida International (FBS Sun Belt) 41 - 38 Akron (FBS MAC)

Hmmm, Akron is better than expected... or FIU is worth than expected. Maybe Akron could win 2 games this season, starting next week with Morgan State.

Georgia Tech (FBS ACC) 59 - 3 Presbyterian College (FCS Big South)

Squash !!!! How much GT officials paid for this training session ?

UNLV (FBS MWC) 14 - 17 Northern Arizona (FCS Big Sky)

DAMN !!! Why UNLV is so bad this season ? Northern Arizona is not a FCS powerhouse, I really thought UNLV would win this game by at least 10 points... but players seems to have forgotten a football game last for 4 quarters, not 2. It was Northern Arizona's first win against an FBS team in 25 years. Next week, UNLV takes on Washington State (FBS PAC12) for (I think) another loss.

Arizona (FBS PAC-12) 59 - 38 Oklahoma State (FBS BIG12)

Maybe Oklahoma State needs to pay opponents to win games... I thought the real test would be against Texas next week, but it happened earlier... Congrats to Arizona players, for showing Oklahoma State players what a real football is.

Colorado State (FBS MWC) 7 - 22 North Dakota State (FCS Big Sky)

I think North Dakota State deserve a place in the FBS with this win. They are the best program in FCS this season, and I place them in the FCS playoff finals. Colorado State don't have to be ashamed by this loss. It was a great match by North Dakota State and the score reflect this.

Bowling Green (FBS MAC) 21 - 13 Idaho (FBS WAC)

At least, Idaho played better than last week, but they faced a better opponent than last week... The not so long road to the Big Sky goes on, and stops by Baton-Rouge next week, with LSU (FBS SEC) welcoming (or squashing) them. Idaho fans might have to wait until October 13th to see their team winning a game, when they will travel to San Marcos, TX to play against Texas State (FBS WAC).

Western Michigan (FBS MAC) 52 - 21 Eastern Illinois (FCS OVC)

WMU players can thank Eastern Illinois for being a FCS program. The game wasn't enjoyable to watch, with too many approximations by their QB.

Eastern Michigan (FBS MAC) 14 - 31 Illinois State (FCS MVFC)

With this game, I don't see how Eastern Michigan can win this season. If they don't wake up, they will finish this season like 2009 and 2010 seasons finished (0-12 and 2-10).

See you next week !!

lundi 3 septembre 2012

The Intriguing 10 (INT10) - Week 1

Every week, I will pick 10 college football games which will feature at least one FBS program. These games won't feature powerhouse programs and the stakes will be different from games between two powerhouse programs.

I will give my opinion on every game with an ironic side. These comments will be about the game itself and/or the teams, according to the stakes of the game.

For every team, I will give the conference they are member of.

The first team is the home team

Idaho (FBS WAC) 3 - 20 Eastern Washington University (FCS Big Sky)

Idaho officials don't know if they have to keep the football program in the FBS ? Maybe the players gave their advice during this game. What's next for Idaho ? FBS Independant ? FCS Big Sky ? If Idaho doesn't wake up quickly, the WAC will loose another member in 2013-2014.

UNLV (FBS MWC) 27 - 30 Minnesota (FBS Big Ten)

A least Minnesota won't be winless this season. And UNLV begins the season the same way the previous one finished. Next week UNLV received Northern Arizona (FCS Big Sky) which might be a well sized opponent. For Minnesota, they receive New Hampshire (FCS CAA) and Western Michigan (FBS MAC), they can hope of 2 consecutive wins (for the first time for since 2010), and even of 3 consecutive wins (for the first time since 2008)

Middle Tennessee State University (FBS Sun Belt) 21 - 27 McNeese State (FCS Southland)

Yeah !!!! An upset (according to ESPN). A normal victory for me. MTSU football program is falling since their bowl victory in 2009 (2-10 last year, 6-7 in 2010, 10-2 and a bowl game victory in 2009). McNeese State is not a FCS powerhouse, but they are quite constant over the last 5 years, their last losing season was in 2004 and they went to the FCS playoffs few times since 2004. McNeese State really deserves this victory for their regularity over the years.

Florida Atlantic University (FBS Sun Belt) 7 - 3 Wagner University (FCS NEC)

FAU won't be winless this season, but that's all. They won't play another FCS opponent this season, and I actually see MTSU beating them next week.

Akron (FBS MAC) 14 - 56 UCF (FBS C-USA)

For Akron, every year is the same. Last opening game victory ; 2007 vs Army. Their only win last year was versus Virginia Military Institute (FCS Big South). This year, Morgan State (FCS MEAC) will try to beat Akron. We will see whether Akron's season will be as bad as their last season on September 15th. I don't FIU getting beaten by Akron next week. On november 10th, Akron will travel to Massachusetts to play UMass. No doubt this game will be in the INT10 this week.

Connecticut (FBS Big East) 37 - 0 UMass (FBS MAC)

You need to start someday, but I don't think UMass players thought it would be this difficult. Next week, they welcome Indiana (Big 10) at the Gillette Stadium, and 2 weeks from now, they will travel to Ann Arbor, to play against Michigan. Be brave kids, the MAC conference games are coming. For Connecticut, it's quite difficult to evaluate them after this game, the next 2 games (vs NC State and at Maryland) will give us more information about this team future.

UNC (FBS ACC) 62 - 0 Elon (FCS Southern)

A complete beat-down. Conceeding 62 points is not easy to endure... mainly because UNC stopped playing during the fourth quarter. What to expect for Elon ? Rebirth like their mascot, the Phoenix. UNC is their only FBS opponent this season, the next games will be close from their playing level. For UNC, let's see the next games (at Wake Forest and at Louisville) to see what they are capable of. On September 29th, they welcome Idaho, another beat-down in perspective...

South Alabama (FBS Sun Belt) 31 - 33 University of Texas at San Antonio (FBS WAC)

Both programs are playing their first game in FBS. And it's A GAME to see. Quite balanced game, with an astonishing performance by UTSA kicker Sean Ianno (4/4 FGs from 21, 32, 47 and 51 yards). Ianno is only a sophomore, if he continues to play like that, we might see him playing on Sundays 3 years from now. Next week, South Alabama welcomes Nicholls State (FCS Southland) and UTSA welcomes Texas A&M Commerce (DII Lone Star Conference), I'm pretty sure both team will win their next game. But I will continue to follow Ianno which surprised me with his regularity on the kick.

Maryland (FBS ACC) 7 - 6 Will & Mary (FCS CAA)

Thankfully Maryland woke up during the fourth quarter with a touchdown with 10 minutes remaining in the game, otherwise plays would have a bad time with their coach. Frankly, a 1 point win against a FCS team, for a team like Maryland which has ACC title expectations, it feels bad. I'm clearly disappointed by their lack of performance. Next week, Maryland comes to Philly to take on Temple, let's see how it will finish. But if Maryland plays this bad, Temple will enjoy this game.

Oklahoma State (FBS Big12) 84 - 0 Savannah State (FCS MEAC)

I'm hesitating between disappointment and prostration. I'm disappointed by Oklahoma State's attitude, which only pumped up their point average. At least, UNC stopped playing in the fourst quarter, but Oklahoma State continued his destruction work by scoring 2 TD in the last quarter. I know every year, the first week gives us uneven games and large scores. But here, it's the worst I've seen recently. Thankfully FBS team are not allowed (with exceptions) to play against Division 2 and 3 programs. Let's see September 29th game against Texas (Big12), as we will be able to see them against a real opposition.

See you next week !!

dimanche 1 juillet 2012

Debian Wheezy has been frozen

And it's the first time I actually live a Debian freeze.

Lire la suite...

lundi 2 avril 2012

DDB lenny-backports discontinued

Hello everybody.

As Debian discontinued the support of the 5.0 "Lenny" release, I decided to do so in the DDB.

I will continue to maintain the squeeze-backports, and lenny-backports will be moved into another repository at http://archives.ddb.davromaniak.eu which will be created in the next hours or days.

Thanks.

- page 1 de 3