June 27th, 2008 by Daniele Muscetta
Today, I just updated Hyper-V to RTM version. Oh yeah, because Hyper-V has been Released To Manufacturing today! You can get it HERE.
I am having lot of fun with this. I had not bought a new PC in about 7 years and could not really test anything on that old one anymore…
I paid 8GB roughly 100euros, which is not a lot if you think about it. These days even standard "budget" PCs for just doing email and web surfing ship with 2 or 4GB…
With that amount of RAM, I expect it to last several years like the previous one. The one I bought 7 years ago had 512MB when everybody was buying 128 or 256MB. Kinda the same story here.
Wonder what happens to the old PC? That glorious machine that has been my server for years has now been converted to the new kids' PC and will go on for a few more years like that, I hope.
Posted in category: Microsoft, Personal
Tags: Choice, HyperV, screenshot, Windows
Trackback | No Comments »
June 10th, 2008 by Daniele Muscetta
Once upon a time, I used to store some automated small backups into GMail just by having the scheduled backup send an email to my GMail account. At one stage they blocked me from doing so, marking those repeated email as SPAM.
After that, I took a different approach: I kept sending the mail on the SAME server as the backup, and using IMAP I could DRAG-and-DROP the backup attachment from the mailbox on one server to the mailbox on another server (=GMail). They did not mark me as a spammer that way, of course.
So that worked for a while, but then I got tired of doing this manually.
So the following ruby script is the way I automated the "move offsite" part of that backup.
For completeness, I will give the due credits about who set me on the right track: I started off by this example by Ryan.
begin_ = Time.now
require 'net/imap'
$SRCSERVER="mail.muscetta.com"
$SRCPORT=143
$SRCSSL=false
$SRCUSERNAME="daniele"
$SRCPASSWORD=""
$SRCFOLDER="INBOX.Backups"
$DSTSERVER="imap.gmail.com"
$DSTPORT=993
$DSTSSL=true
$DSTUSERNAME="muscetta@gmail.com"
$DSTPASSWORD=""
$DSTFOLDER="Backup"
puts "connecting to source server #{$SRCSERVER}... nn"
srcimap = Net::IMAP.new($SRCSERVER,$SRCPORT,$SRCSSL)
srcimap.login($SRCUSERNAME, $SRCPASSWORD)
srcimap.select($SRCFOLDER)
puts "connecting to destination server #{$DSTSERVER}... nn"
dstimap = Net::IMAP.new($DSTSERVER,$DSTPORT,$DSTSSL)
dstimap.login($DSTUSERNAME, $DSTPASSWORD)
dstimap.select($DSTFOLDER)
uids = srcimap.uid_search(['ALL'])
if uids.length > 0
$count = uids.length
puts "found #{$count} messages to move... nn"
srcimap.uid_fetch(uids, ['ENVELOPE']).each do |data|
mid = data.attr['ENVELOPE'].message_id
puts "reading message... #{mid}"
msg = srcimap.uid_fetch(data.attr['UID'], ['RFC822', 'FLAGS', 'INTERNALDATE']).first
puts "copying message #{mid} to destination..."
dstimap.append($DSTFOLDER, msg.attr['RFC822'], msg.attr['FLAGS'], msg.attr['INTERNALDATE'])
puts "deleting messsage #{mid}..."
srcimap.uid_store(data.attr['UID'], '+FLAGS', [
eleted])
srcimap.expunge
end
dstimap.close
srcimap.close
end
total_time = Time.now - begin_
puts "Done. RunTime: #{total_time} sec. nn"
Posted in category: Coding
Tags: backup, Blogs, Choice, Cross Post, GMail, Google, IMAP, Interop, Ruby, script, storage, Tools
Trackback | No Comments »