AWS RDS SqlServer Native Backup and Restore

Had to learn this yesterday to clone a production environment down to a lower environment. Figured it qualified for a blog post.

exec msdb.dbo.rds_backup_database 
         @source_db_name='xxxProd',
         @s3_arn_to_backup_to='arn:aws:s3:::xxx-sql-native-backup/xxxProd.bak',
         @overwrite_S3_backup_file=1,
         @type='full';

exec msdb.dbo.rds_task_status;   -- till lifecycle=SUCCESS

ALTER DATABASE xxxUAT SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
drop database xxxUAT;
exec msdb.dbo.rds_restore_database
         @restore_db_name='xxxUAT',
         @s3_arn_to_restore_from='arn:aws:s3:::xxx-sql-native-backup/xxxProd.bak';
exec msdb.dbo.rds_task_status;   -- till lifecycle=SUCCESS

delete from xxxUAT.dbo.SensitiveTableStuff;

The Gotcha’s were:

  • Had to set up an option group that added SqlServer Native Backup and Restore to the RDS instance.  It took a few minutes to apply, the RDS instance did not reboot or go offline during this process.
  • Could not restore over an existing database.
  • Learned the hard way that while you can detach, you can’t re-attach a database using SSMS.  Reattaching uses a custom stored procedure.   And detaching and attaching had nothing to do with deleting.

Heart Rate with Fever

Been a long time since I posted.  Lots of stuff going on; no lack of that; just lack of priority…  Well, one of the things I’m looking at is “why did I post”, looking at those motives, calling them into question, and redirecting energies.     That could have been another post, if I were to post that stuff .. see how meta this is?

Anyhow, here’s an interesting thing that developed over the last few days.   I started feeling crummy, definitely crummy by Monday 7pm or so.  Ended up with a fever.  Better now.   Looked back at Heart Rate data, and … I can tell!   That heat has to come from somewhere, right?

IMG_0758IMG_0757IMG_0756

Sunday is provided as a reference for a normal day.   HR hanging between 70 and 100.

In case it was a stomach bug – Monday 9am: Instant Oatmeal from Aldi   12pm: Chipotle Steak Bowl

Monday, about 3pm, you can see it start to rise.  I didn’t realize I was sick until about 6pm.  At the time, the single read temperature was 98.9 degrees, compared to my normal of 98.6 or is it 96.8 I can never remember… not enough to count.

Tuesday, I had an important meeting at work, so I went in .. then headed home.  Slept a long time.    About 6pm, actually detected the fever at 100.5, took a Tylenol.    Heart rate and fever started marching back down. 

Wednesday – kinda-working-from-home — my appetite seems to be coming back. 

Pretty cool stuff.

No Mans Sky–Spreadsheet of Desire

Still playing it.   I’m actually finding the number of story missions .. relentless.  Like, stop bugging me, lemme go free play for a bit dangit.   OTOH, its definitely .. hey I have an hour to play .. lets go knock something out .. 5 things later .. oh, I never got around to the one I was going to do.

I do not have a head for remembering detail (anymore).   So, I came up with this – I tried it in Google Sheets first, but they don’t have good visualization of formulas, so Excel wins this round:

image

The plan is that the Calcs stuff (Column I onwards) is a bunch of rows where I can say “if I want 1 metal plate, you gotta have 50 ferrite dust”.   Unfortunately, in Excel, i can’t sort this .. not the way it is.  This would be better done as a quick app.   Anyhoo, I can type in my inventory on things, and then it gives me how much I need of what, and using the visual tree above I can figure out the build order.

If I did it as an app, I could probably also factor in stuff like “how much carbon to run the refiner” and “how much carbon to run the mining laser”, although the latter would need some “how good is your equipment” estimates.   Could probably also try to calculate “how much time would this take” and optimization of which fuels to use “by cost” vs “by time to acquire”.

If I did it as an app, I would load it with a text file which has a one-line language for describing things and what they are dependent on, for example “Warp Cell|Craft|Antimatter Housing:1,Antimatter:1”.  That way the 2nd thing, if it were “Refine”, could then bring in additional costs associated with that.

No Mans Sky

Started playing with the 1.5 update.   Fun so far..   went back because I was feeling lost, and mapped out the starting part of the game. Here it is, probably 85% consistent, till the point where you can leave the surface.   I was trying to do solid line = component, and dashed = influence, but that got a bit tangled.  (Thanks to draw.io for the auto-layout).

NMS Intro Build

Its a pretty large game.  I still need to re-build a base, and then possibly get to hyperdrive.  Haven’t done much archeology yet, nor have I done much stuff in space. 

Don’t know that I’ll play it too much longer, we’ll see.

My first Electric Bill!

Got my first electric bill since we got the EV.  

IMG_0409

Uh….  I guess that’s $30 bucks more than the same month last year?

Graphing it out vs temperature, its still hard to say.  We also had a bad furnace fan that shifted some numbers around:

image

Doing the math, I’ve driven about 1000 miles since I got the car.

  • IMG_04101000 miles at 4.5 miles per kwh is about 222 kwh.   Bill shows 1324kwh
  • 222 kwh at 9 cents per kwh is 2000 cents.
  • Which is $20.

That ends up at $0.02 per mile.

Yay.   Reality fits.

Regrets buying my Nissan LEAF EV

I wish I could have bought a Tesla.

I’m still super-glad that I switched from an ICE (Internal Combustion Engine) car to an EV.   I do get a little twinge when I see a Prius Prime plug-in-hybrid, however, I have to go back to the big deciding factor:

$300/month.

Yep.  That was the number.   I couldn’t do it with my initial reservation .. maybe I could have done it with the 2019 base Model 3, however, I love technology, and … that would not have been honest with myself.   At least the technology package and AP2, which brings that up to $43k.

However, before I get too far in to my pity party, I need to review:

ICE Car Used Leaf in my Price Range My future Tesla
No Gas!
ditto
Super quiet + Jet engine sounds
ditto
Nice acceleration
Even better acceleration by the numbers
Remote start A/C and Heater
including a timed heater start in the garage because no emissions.               
ditto
All-Around-View Camera
Could happen
Inexpensive maintenance
– no oil changes, etc.  Service every 18k miles.
ditto, except about $600/y with prepay options.
Prius got to 15 cents per mile. Inexpensive per-mile costs
– 3 cents per mile
ditto
Many inexpensive ICE cars available. Reasonable Car Cost
– 28 cents per mile (assuming 60k miles payoff)
Not there yet.  Best I could do was around $1/mi at the moment.
Can fit many things Awkward, can’t really fit all the stuff that I could fit in a Prius. I hear its better.
Easy around-town range as long as you visit your gas station 85mi is almost enough. Almost.  There are chargers that make things better. Much better ranges
Long Distance Travel. Not in the Midwest. I can perhaps get to Cincinnati, if I go at 60mph. Superior infrastructure and range.

To be fair, the newer Nissan Leaf had a better range, which solves some of the problems, and if I had done a lease, I could have gotten as low as $300/mo.   However, there’s another angle – I wanted to experience the frustration of a short range EV. So that I have a realistic sense of what was possible/what is not, so I can point people at stuff that’s even better than what I have.

How close till my future Tesla?

If I back track the $ trail – lets say $400/mo (car payment, I’m not adding the $90 in gas that I don’t pay anymore) – at 3.5% APY that gets me to around $21k.   How long till a used Tesla gets down to $21k?

If you go to https://www.cargurus.com/Cars/price-trends/Tesla-Model-S-d2039 and play with the dates, I can currently find this chart:

image

See that little rise at the end?    Annoying.   And, It seems to take about 3 years to drop .. about 40%.  Also note they have no info on price trends for model 3’s and model X’s.

Another tracker:  Used car listings on carguru.com showed the cheapest model three at $51k.

Another tracker:  Used car listings on Carmax … only show Model S’s, and they are way more expensive than the used cars at Tesla.com.

Another track would be a much larger car payment, but .. that’s not something I’m willing to bet 5 years of cash flow on right now.

Its safe to say .. not soon.

So here I am.  I DO love that I’m driving an EV;  Yes, its a bit hard and clunky in some ways; but give it a few years or so (time goes by faster as I get older) and lets see.

Life stuff leads to Leaf EV

Life has been in flux since the end of March.  I thought I’d take April off and recharge, but life had other plans.  In very short order:

  • Death of a human family member in my extended family
  • Death of our canine family member in my immediate family
  • Death of a Prius via large Pothole and frame damage

Not going to dwell there.  However, the last one is launching me in the following directions:

  • Purchase of an EV to replace the Prius

This LEAFS me in a bind.  the EV thing is huge.  Do I blog about it? Do I tweet about it?  Does anybody care?  Do I just tell my friends?    Should I vlog?  ???

I’ve started a thread on Facebook – on a photo – where I’m taking questions.   https://www.facebook.com/photo.php?fbid=10156221680033444  .. if you have any questions, please feel free to ask there, leaf a comment comment here, or  tweet at me @sunjeevgulati.

I’ve got a spreadsheet going where I’m keeping track of charge-times and distances travelled.  I’m sure there will be a blog post on that later.

Overall, the map of what I’ve learned so far, thanks to draw.io.  Green = specific to me.  If you’re buying a LEAF, you will learn what these things are.

LEAF information

Gah, found a bug.  “S” Trimlevel also has a 3.3 Kwh charger.  And note, these are all pre-2018 LEAF’s.. they seriously upgraded in 2018.  Used price on those isn’t low enough yet, I needed a car payment under $300, which is also why no Tesla Model 3 Smile 

Enough for now.

I Spoke

This was such a big deal; and now it is such a little deal.   What is it really?

I spoke at a conference for the first time – Pics of Bling:

image image
image image

Leading Up

Leading up to it, it was .. scary. 

  • Will I have something worthy to say? 
  • Will I be able to say it? 
  • What if I say something and I’m wrong?
  • WILL I BELONG?

Walking into the speaker dinner the first time ever .. as a volunteer, three years ago .. surrounded by these splendid specimens of technical trueness .. was both overwhelming and exciting.  Some of that is captured in this blog post:  https://geekygulati.com/2015/04/27/codepalousa-day-2-for-me/

And this year, at the prompting of my company … I took the plunge and I submitted a talk. (Well, technically, two talks, because @jstill did a talk together).    And it took a LOT of time:

image

28 Hours, in powerpoint, to be exact.   A lot of this was after-hours.   There’s probably another 4-5 hours in there working on it in other apps (like looking for images, or looking up screenshots, or drawing things).   The above graphic is thanks to RescueTime, which I have on both my work and personal machines.   I also spent 14 hours on Youtube in March. 

Delivery

I don’t think there were any empty seats in the room.

Several people I respect were in the room.

Several of my former students where there!

One person was there because they had seen me talk about RSI.  (link)

I got nervous, and I got ready, and I started … at 3pm, 15 minutes early.  ABORT.   Continue with asking people what their challenges were.  A flow started to form in the room.   Got warmed up.

Once I launched into it, it was fine.  The slides had personal meaning for me, so the slide pulled the information out of me, in the grooves and paths that rehearsal had laid down before.   I had my comedic timing on the sloth slide, and the cat nap slide, amongst others.  I think I saw lightbulbs and people writing stuff down furiously at certain points.  There was drop dead silence as we talked about fears, and then laughter as we went to the van down by the river. 

And then

It was over.  I wish I had spent some more time winding down the presentation, and maybe asking people to give me feedback.  Maybe I could have had my twitter handle present in the slide master like the Storyteller Spellbook’s author talks about.   I did ask specific people what they got out of the presentation, and it was pretty much all on the fears side, not on the process side.

AND THEN

It crept up on me slowly.  At the Google Thursday Night Party.   I was a speaker.  I had crossed that bridge.

What is that bridge?  Who was I before, and who am I after?  And not much has changed, yet, something is different.

Before

After

Maybe what I have to say is relevant? Maybe not. My experiences have relevance
I wish I could help people I can help people.
I wonder if I’ll ever … Looking forward to the NEXT!  what will it be?

Possibilities

I could definitely submit this talk to other conferences for 2019.

I could do several things for CodePaLousa for 2019.  I could expand on existing things:

  • An expanded version of the RSI talk (instead of 10-15 minutes) …  although, learning to dragon dictate again will be annoying.  And I’m so unsure about the quasi-medical stuff that I unearthed. 
  • Zoom in deeper to dealing with Fears.  I skipped all the stuff from where you become aware of the fear to awareness/acceptance and DABDA before you can get to effective action. 
  • Zoom in deeper into prioritization.  I glossed over the Franklin stuff, I could look at GTD and other such things, I could delve into the not-perfection aspect of it, I could look at the swapping of spots in a queue, etc.
  • Zoom in more into tools.  I didn’t mention Rescuetime, Ditto, or Timesnapper.   Maybe.

I could also do some stuff that’s bouncing around inside, but hasn’t come out yet:

  • How I deal with Conflict.   (Non Violent Communication, basically, except I’m not certified in NVC, and usually walking through that leads to a breakthrough even prior to talking with the other party.)  I know @chadgreen has a talk and a series of blog posts about the same subject.
  • Patterns within Healthy Organizations – keeping this one vague, ask me in person and I can explain why. 

I wish I had technical things I could talk about, but I’m not at the forefront of technology anymore (was I ever?) — I just use things to get the job done.  

I’d love to cover some of my pet projects .. like 3D Printing My House, or making the Tree of Directions, or the as yet uncompleted Map of Best Routes.   Some of these projects are older now, and not very hip.   But hey, I could submit them, and whatever gets chosen, go have some fun with that.

Okay, enough ruminating.   Time to button up this blog post.  There are other stories from the weekend, like how @bryan_soltis helped me find my elevator pitch, and how @guyroyse came up with a perfect summary of @heyslingshot.   

Thank you @CodePaLOUsa for giving me this first opportunity.

From Certifiable to Certified

imageYesterday, I passed my AWS Certified Developer Associate exam.  I started studying for it two weeks ago.

Actually, no, I started studying for it a year ago when I started using AWS.  And at the time, I thought I was going to take the Certified Solutions Architect Associate exam, but we went for this one because its easier, and I had two weeks to study for it.

Why two weeks?  My company has been going for an AWS Partnership thing, and for that we need two certs.  It wasn’t a immediate priority… until some stuff came up which really affected some of our value.   We raised the flag, this needs to be a priority.  Schedule it and take it, and lets send two people so that if either one passes, we’re good.   We both passed.

What did I learn in those two weeks about how to study for the exam?  If I were to go back in time to younger self, what would I tell him?

ACloud.Guru, but not like that

https://acloud.guru is VERY good.  I’m keeping my subscription to it so I can listen in to some of the master-level courses during my commute.   However, I had prescribed something like:

  1. Listen and watch all the videos
  2. Take all the Quizzes
  3. Take the practice exam
  4. Go read other boring stuff.

Inefficient and Fear Based

Turns out, if you get a subscription, they have this thing called an Exam simulator (beta).  And at the end of this you get to see what you did wrong (as well as what you did right), and an explanation of the thing, and a link to more resources:

image

The suggestion is to attack the problem from a different angle

Thing is, both the real exam and the practice exam asked some pretty in depth questions that the video instruction does not directly cover.  Ryan does say, “Make sure you read the FAQs” and that’s 100% for real.  You gotta read the FAQ’s.

However, the FAQ’s themselves reveal the core ideas central to the service you are reading about. As do the videos.  My suggestion is that once you are comfortable, you get denser information faster from the FAQ’s. 

I also found that the developer exam really wanted to know if you had used something.  Called some methods.   And if you hadn’t .. like me, I just barely used scan and query mostly I was being a sysop and using terraform to set things up for others ..  then reading through the actions, attributes, headers etc – gives you that feel of what actually working with the thing is like.  (Assuming you have plenty of experience and have done many things in the past).  You’ll get into the mind of the designers of the system, and from that, you can infer all kinds of stuff. 

Some Of My Notes

imageI started out taking notes on Paper.  Then I took notes in Google Docs. Then I switched over to sheets.

I’m a visual person, and I like organization, and having a big grid where to “store” information (human brain is optimized for location tracking) was very helpful for me.  If I got a concept wrong, I could go back to the place where that information was hiding on my sheet… it would probably help to have a background “image” to place information even better.  I’ll do that next time.

The Actual Exam

Here’s what was different from what I expected:  Location: Downtown Louisville, Jefferson Tech I think

  • Parking was easy to find early enough in the morning.  I vavigated straight to a parking lot, and paid for the day (less worry!), about 2 blocks away.
  • The proctors were very nice friendly people who gently guided my anxiety stricken self through what I needed to do.
  • Much to my surprise, I got there an hour early, and they invited me to take my test early. I was done by the time my actual start time came around.
  • The actual exam was pretty much at the same level of detail as the acloud.guru exam was, except for more “you really gotta know this” choose all that apply type questions.  I detected at least one stale question on the test, which I commented on.

My weakest areas:   Federation, and Cloud Formation, I think.   Makes sense, haven’t really had to do that, and we use Terraform for the same task.

Woot woot.  Okay, gotta go run a race now.

What To Mine

I finally understand WhatToMine.com.

image

This bit is which video cards you have.  The ones in Red are ATI cards .. the ones in green are NVidia cards.  Well, technically that’s just the chipset, but .. yeah.  You put in how many of them that you have, and you click the button.  Green or Red = on, Gray = not on.

If you hover over the button, you get this:

image

The +150/+500 is the tuning you can do in MSI Afterburner:

image

You can see the numbers applied .. I’ve also additionally limited power to 50% and temp limit at 60 because I don’t want to burn out my new graphics card…

So you put those numbers in, and then it tells you what it thinks you can do:

image

This is where you turn on or off the various algorithms .. for example Ethereum uses Ethash and Monero uses CryptoNight.   Based on the graphics cards selected, it prepopulates the numbers, but you can change those numbers to reflect what you actually get. 

So far its been very accurate – with the tuning in place, i get 29.42 Mh/s for Ethereum, and 680 h/s for Monero (although Monero I get an additional +160 via CPU if I so choose).

image

image

Then, there’s the list of exchanges.  Some exchanges deal in some coins, but not in others, and that narrows down the list of coins ..   join Exchanges to Algorithm.   My favorite exchange, Binance, is not listed.     And then that gives you ..

image

  • The Profit is the estimated Profit per day based on mean difficulty and current prices.
  • The % is “as compared to Ethereum”.  The time period has to do with market fluctuations over time … looks like CRC is on a roll right now, so its way more profitable (that usually balances out pretty quick as everybody floods to it and then the algorithm stabilizes).

Looking at used graphics card prices … the break even for a card appears to be in the 7 to 10 month range.   The lifetime of a graphics card .. who knows?  I wouldn’t do it.  Plus proof-of-stake will probably flip a lot of things.