BASH Script for WordPress Backups

A lot of people are worried about backing up their WordPress installs on a regular basis. I know. I get that. Here’s a script you can use if you have access to the shell. Put this sucker on cron (For many Linux distributions, you can put it in

1
/etc/cron.daily

if you have root access. Otherwise, use whatever mechanism your hosting provider offers for cronjobs/scheduled tasks.

Also note that while this script will work fine for most Linux distributions, you should know that every distribution is different and minor modifications may be necessary.

Standard Disclaimer: This script is free of charge and, thus, unsupported. Functionality is neither guaranteed nor implied. I work as a consultant and have many years making WordPress work for companies and individuals. If you want support, you have to pay but I’d be happy to work with you. Contact me for paid work only at aaron@technosailor.com.

With all that done, here’s the script. Make sure you remember to edit the appropriate variables and make it executable.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
#### DO NOT EDIT
DATE=`date +-%y-%m-%d--%T`

#### EDIT BELOW

# If CREATE_ZIP is 0, then a tarball will be used (default). If 1, then a zip file will be used
CREATE_ZIP=0
# Accessible/writable directory for temp storage
TMPDIR=/tmp
# Absolute path to WordPress backup storage location
WPBACKUP=/backups
# Absolute path to WordPress install.
WPDIR=/path/to/wordpress
# Enter Database connection details from your wp-config.php file
WP_DBUSER=user
WP_DBPASS=password
WP_DBHOST=localhost
WP_DBNAME=dbname

#### STOP EDITING
if [ ! -d $TMPDIR ]; then
    mkdir $TMPDIR/backup
fi

if [ ! -d $WPBACKUP ]; then
    mkdir $WPBACKUP
fi

# Dumps the database
mysqldump -h$WP_DBHOST -u$WP_DBUSER -p$WP_DBPASS $WP_DBNAME > $TMPDIR/backup/wordpress-db.sql
 
# Create Archive
if [[ CREATE_ZIP -eq 0 ]]; then
    # Tarballs the Database and WP files
    tar -cvf $TMPDIR/backup/backup$DATE.tar $WPDIR/.htaccess $WPDIR/wp-content $TMPDIR/backup/wordpress-db.sql 2>&1
    gzip $TMPDIR/backup/backup$DATE.tar
    # Move archive to backup location
    mv $TMPDIR/backup/backup$DATE.tar.gz $WPBACKUP/
else
    # Zips the database and WP files
    zip $TMPDIR/backup/backup$DATE.zip $WPDIR/.htaccess $WPDIR/* $TMPDIR/backup/wordpress-db.sql 2>&1
    # Move archive to backup location
    mv $TMPDIR/backup/backup$DATE.zip $WPBACKUP/
fi

The Best Business Smartphone Available (Today)

Chances are, if you are reading this blog, then you have some affinity to technology and that you’re in the business of technology (whether directly, or using technology to do your job – and I don’t mean having a computer on your desk at work). This is a pretty tech-savvy crowd around these parts so I’m guessing that most of you own a smartphone of some sort. Many have iPhones. Perhaps as many have BlackBerrys. A few of you are sad, sad people who own Treos.

A swath of new smartphones have just hit the market and, though I don’t claim to be a gadget or phone blogger (Really, you need to go read Boy Genius and Gizmodo for a far more geeky and informative analysis of all the various devices that hit the market), I do know that I’m a businessman and entrepreneur. I know that, from my perspective, there are key principles and requirements in any phone.

In order for a businessperson or entrepreneur to invest in a phone (again, from my perspective), there needs to be a few key things.

  1. Email – Clearly the killer app forever now, any phone must support email. As part of this, there needs to be a wireless sync/push feature.
  2. Productivity – Any smartphone needs to be able to open files from major vendors – Word, Excel, PDFs, Images, etc.
  3. Competent mobile browser – As mobile professionals, we need the web more than the average home user. We need access to sites that are not inherently broken because they appear on the mobile device.
  4. Reliable network – This is not a plug for Verizon because several U.S. and international carriers can be considered “reliable”. Whatever the network that the phone is on, it needs to be reliable.
  5. Third Party Applications – How easy is it to add apps that you need to your phone? Are there quality apps available or not?
  6. Copy and Paste – One of those “Duh” features that is essential.

You may notice some notable omissions from this list that emphasize the angle of business utility. For instance, cameras, WiFi and GPS are all nice but unnecessary for business. Touch screens, such as the one that comes with the iPhone or BlackBerry Storm are also nice additions, but not required for business utility.

In my mind, there are three phones on the market that are worth considering for business use. I have my preference on which one is best, but businesses all have to decide what their needs are and, if they are practical, choose among one of these three devices.

Apple iPhone 3G S

apple-iphone-3gThe third generation iPhone just hit the market on June 19th. It boasts all of the features of the iPhone 3G plus a quicker OS and a better camera. Most of the new features of the iPhone are available via an OS 3.0 upgrade available for free for older iPhone owners. With the new iPhone, you can tether your iPhone for broadband access on your laptop (except AT&T customers in the US), and an all important Remote Wipe capability that will allow network administrators to remove sensitive data in case the phone is lost or stolen. Cost: $199 with new two year contract from AT&T (US)

Pros

  • Huge number of third party apps including many business apps via the iTunes App Store
  • Remote Wipe
  • Intuitive touch screen
  • WiFi or 3G connectivity

Cons

  • AT&T as the carrier in the United States has been hugely unreliable delivering even basic services like voice mail
  • Exorbitant data plan fees
  • Large glass screen lends itself to breakage
  • Insecure Microsoft Exchange integration
  • Inability to multi-task applications

Palm Pre

palm-prePalm used to be the dominant manufacturer of handheld devices. With the rising popularity of BlackBerrys and iPhones, Palm has slipped tremendously. They recently, however, came to market with a very sleek phone that has an open development structure with their WebOS. Unlike the iPhone, the Pre does a very good job of multitasking and with it’s touch screen, switching between open applications is a smooth process. Also unlike the iPhone, the Pre provides a physical keyboard that, while somewhat awkward to use, should appease users who like the tactile feel of actual keys. Cost: $199 with new two year contract from Sprint.

Pros

  • Small form factor
  • Sprint has a very good data network
  • Bright HVGA screen (touch screen)
  • Email and integration with Microsoft Exchange
  • WiFi or 3G connectivity
  • Classic Konami Nintendo game Contra code to unlock developer mode. Geek Props.

Cons

  • Screen is much smaller than the iPhone
  • Awkward slide out keyboard with tiny keys makes typing difficult
  • Third party application availability is limited at this time
  • No Remote Wipe, a security requirement that might prevent large scale adoption in enterprise

BlackBerry Tour 9630

blackberry-tour-96301For BlackBerry afficionados, the new BlackBerry Tour (available for both Sprint and Verizon Wireless) is a beautiful phone. It has the brilliant screen (if slightly smaller version) as the BlackBerry Bold from AT&T and the form factor and keyboard styling of the new BlackBerry Curve 8350i (from Sprint). It has all the Enterprise integration that BlackBerry has been known for including remote wipe and Exchange integration (via Blackberry Enterprise Server for Exchange). Cost: $199 with new two year contract on Sprint or Verizon Wireless

Pros

  • Familiar usability for BlackBerry users
  • OS 4.7, which includes a usable browser (departure from the norm)
  • Multi-tasking applications

Cons

  • No touch screen
  • Awkward position of MicroUSB slot makes it difficult for right handed users to use the device while it is plugged in
  • Still no competent native Mac support, though this is supposedly coming soon.

At the end of the day, each organization needs to determine what is best for them. iPhones are fantastic devices for custom applications and is being used in the military, enterprise and government alike. They are not the most secure devices though and, for now, require AT&T in the U.S. The Palm Pre offers a significant value for businesses, but lacks Enterprise features such as remote wipe. It is also the first generation model of this phone. The BlackBerry is the most utilitarian phone and remains popular for businesses but its lack of a touch screen, the likes of which Apple has made us expect and long for, makes it “meh” for some users.

Whatever works for you.

Trends in Publishing, Advertising and Paid Subscription Model

The economic downturn is hitting everyone hard. Online content models and advertising is one of the harder hit areas. Long before the beginning of the market freefall, advertising revenues began declining. Evidence shows that, while print and television advertising is declining at an incredible rate, online advertising is not faring much better. The saving grace in online advertising is that, while it is declining, it is declining at a lower rate than offline advertising.

However, it is still declining.

The days of making money online via advertising would, by most accounts, seem to be over and with it comes the question, “How exactly do we make our industry profitable again?”

Conventional wisdom suggests that there are two models. The first is the advertising model. The second is a paid subscription model. Though we have been brainwashed to expect free at every turn, part of me wonders if a paid subscription model would work better. Surely, readers are willing to pay a small fee for access to valuable content?

For my part, I am considering a switch to a paid model. It is my belief that the content found here is worth paying a small fee for. In exchange, such a model would eliminate advertising and would probably be in the neighborhood of $5 a month. But I want to talk to you first.

Does this make sense to you? Would you be willing to support the emergence of a new model that benefits the larger community and how content business models evolve for a low price?

The Rules for Entrepreneurs

Venture Files founder and former curator, Steven Fisher, wrote a series last year that remains one of the best of its time. Even though he has moved on and is working with Network Solutions, I think it’s as important now (if not more so) than it was last year at this time. This is a consolidated (and updated) version of that series.

Pay Yourself First

Over the last 9 years and two startups I have learned many things and screwed up royally in some cases. This series is about providing you best practices of lessons learned and avoiding the mistakes I have already made.

In the past, I have had good years and bad years. When you have employees, they expect to be paid and when you mess with payroll (and payroll taxes, but that is a post for another time) you create such a negative culture that nothing will get done.

With that said, when you are starting your business regardless if it is a service or product company, you will have startup costs and probably forgo paying yourself for 6-12 months to keep growing the business. That is fine and to be expected. What you should not do (and what I did) is keep adding staff and sacrifice your own salary in the name of growth. If you keep going like that and have a bad quarter you will have nothing saved for a rainy day and if the business fails you will probably be in immense debt and got nothing out of the business.

Granted, the balance between growth and cash flow is a tenuous one but it is one thing you should never defer to someone else in beginning. Plus, there is a difference between creating a lifestyle business and an enterprise. A lifestyle business is really making enough money for yourself and having some contractors or 1-2 people that gives you a good salary but is more about freedom. An enterprise is a business that scales and gets big over time but you will be working intense amounts in the beginning but will need to hire those smarter than you with the intention that you are looking for an exit and will have time for freedom when you cash out.

So when you are growing the business you should work the first 6-12 months paying off the initial capital expenses and getting about 6 months of cashflow for yourself before you hire anyone else. Once you have that done, start paying yourself something, even if it is small and will ramp up over six months, pay yourself first. This will get you in the habit of being committed to making the business pay for itself and you so you are not worrying about living month to month and let you find some resources to help you deliver while you continue to sell and grow the business.

Once you are looking at hiring someone use these two rules as a starting basis:

– Have six months of payroll for that person in the bank on top of your salary

– Have 90 days of projects or sales committed for that person to deliver so they not only have something to do but are earning their keep.

You may have to be conservative at first in your growth but in the end you will scale better and create a business that is focused on delivery and customer service without putting you and your employees on a cash flow roller coaster.

Roadmap to Victory at Washington Post

Early last month, after the Tribune Company announced that it would enter bankruptcy protection, the conversation surrounding the demise of newspapers and the newspaper industry heated back up. Of course, we suggested that there should be an opportunity for new media to emerge in the newsrooms.

Today, the news comes from the New York Times that Phillip Bennett, the number two man at the Washington Post is stepping down joining the former WashingtonPost.com executive editor, Jim Brady, who also resigned recently.

thewashingtonpostThe Washington Post was one of the early newspapers who tinkered with social media tools in their online offering by utilizing a widget to display links to blogs that wrote about their stories. However, since then, they have not innovated all that much. Sure, they have blogs, but what major newspapers doesn’t? And really, does a blog matter if it isn’t compelling?

If I were on the inside of the Washington Post, I’d offer the following roadmap to a viable business entity.

  1. Combine resources of online and print media. No story should be exclusive to one or the other.
  2. Recognize that the business future does not lie in print and print subscriptions, but in online. Change business model to reflect a more traditional online content network. This is a wide swing from a subscription paper model.
  3. Develop content sharing partnerships with other newspapers. Washington Post has already done this with the Baltimore Sun. Suggest the The Times of London, Sydney Morning Herald or the San Francisco Chronicle to round out other-coastly or international perspective. Not sure how this would be mutually beneficial, but each publication will have its own interests that would need to be examined.
  4. Replace the Op-Ed section with blogs but use syndicated content from external blogs. Eliminate home grown blogs altogether.
  5. Develop online video channel on YouTube and bring into the online WaPo offering.
  6. In a related sense, develop a rich media network of content including podcasts – maybe primarily podcasts, due to the lack of exclusive attention required.
  7. Hire internally, or bring someone in from outside, to help the online business adapt to the new and changing landscape involving the internet and social media. The Toronto Globe & Mail did this with Mat Ingram.

I’d like to throw out one self-serving offer, since I know that there are increasingly a number of newspapers who are watching, reading or otherwise paying attention to our content here – I’m happy to discuss opportunities where I can step in and help. Sometimes that outside set of eyes is what is needed. Drop me a line at aaron@technosailor.com or call me at (410) 608-6620.

Welcome to a Top 100 Marketing Blog Which is Not a Marketing Blog

Welcome to the many marketing and communications professionals who are visiting this site today. I was pleasantly surprised to find out that Invesp.com listed me as the #40 most influential marketing blogger of 2008.

To be clear, while I appreciate the designation, this blog is not about marketing. That said, the internet is a space where communications are changing radically. Folks like me are at the forefront of the digital revolution, and so what we do is in many ways the marketing of tomorrow (and in some cases, the marketing of today).

If the point of marketing is to disseminate a message, it is arguable that I am in fact a marketing blogger. However, I would take it a step farther to redefine marketing as the effective, and increasingly online mode of connecting people with people, businesses with businesses and people with businesses. It is less marketing and more community. It is less message, and more trust. It is less organizational, and more grassroots.

Welcome to Technosailor.com. I hope you’ll stick around and learn. Hopefully I will learn from you as well, so feel free to comment and contribute. If I can make you think and you can make me think, then our jobs are done. And of course, I am willing to bring consulting power to your online communications as well. Drop me a note.

Embargoes, Corporate Blogs and Getting a Story Out

Over the past few days, the way the news is done (as told by blogs) has been challenged once again. Mike Arrington, in a moment I can only assume was brought on in frustration by another mismanaged embargoed story, declared unilaterally that TechCrunch would agree to any embargo and proceed to break it thereafter.

Marshall Kirkpatrick came out on the other side re-assuring the public that Read Write Web would honor embargoes.

This morning, Jeremiah Owyang, who I skewered recently over sponsored post opinions, started asking some great questions around the communications of “hot” stories – that is, stories that companies deem newsworthy and seek coverage from bloggers on.

Jeremiah wonders why companies don’t disseminate this information themselves? The answer is: They do. Everyday, thousands of press releases are sent out, most of which fall on deaf ears.

Companies, realizing the difficulty in communicating online in an internet age, have turned to blogs as things they must have. The problem, however, is that traditional communication tactics have been applied to a corporate blogging strategy (you do know the difference between tactics and strategy, right?).

In other words, most corporate blogs are boring. Nobody reads them. Nobody cares. And so, most companies handling their own “news” stories will fall on deaf ears. It’s a numbers game. Get the story to the top blogs in the space that cover the genre of product or service, and you get the most eyeballs. Get more eyeballs, the percentage of sales go up.

The Corporate blogs that are effective are the blogs that participate in the larger community. They not only promote their own products, but they have a distinct outwardly looking mentality that helps their readers be better people, business people, marketers, wives, husbands, internet citizen, etc. They enable community, which benefits their own business.

Most corporate blogs have not figured this out. Instead, they are used primarily to shill their own products and services and let’s be honest, everyone hates getting spammed. Thus, the corporate blogs are not read and the companies are left relying on bloggers such as Mike Arrington to get their messages out.

In an ideal world, Jeremiah’s concept would be best. Businesses would have respected and competent media arms that could disseminate and challenge the community and cause effective bounce in their online presence.

If you’re a corporate blogger, I’d be particularly interested in your thoughts on this.

Welcome to the Machine

Welcome my son, welcome to the machine.
Where have you been?
It’s alright we know where you’ve been.
You’ve been in the pipeline, filling in time,
Provided with toys and ‘Scouting for Boys’.
You bought a guitar to punish your ma,
And you didn’t like school, and you
know you’re nobody’s fool,
So welcome to the machine.

Welcome my son, welcome to the machine.
What did you dream?
It’s alright we told you what to dream.
You dreamed of a big star,
He played a mean guitar,
He always ate in the Steak Bar.
He loved to drive in his Jaguar.
So welcome to the Machine.

Remember that song? From the album Wish You Were Here, Pink Floyd in an almost prophetic motion saw a generational change coming years before it actually arrived. The song was widely believed to be about the music industry and the “slurping” of fresh blood artists into the controlling depths of the recording industry, but I see something far more nefarious and relevant to today in light of the economy and business.

Photo by <a href="http://flickr.com/photos/tonivc/382150181/">ToniVC</a> Photo by ToniVC

In fact, we are so out of our league with the concept of open innovation in a web environment that the generational, societal and economic corrections are about to kick in. The economics are already kicking in with the entire marketplace shrinking, if you look at market conditions, 50% in the last year.

I asked a VC a few days ago what he was investing in in a down economy and his answers indicate low-risk investments – that is, investments that are cash flow positive with an existing customer base. Yeah, not much risk and certainly different than the VC market we’ve been used to. If this is the mindset that is prevalent, there will be fewer innovators as less cash is available to be had. Fewer, or smaller innovations. Welcome to the Machine!

Generational corrections occur when a generational mindset changes. While my friend, Jessie Newburn is the resident generational expert in my circle of influencers, I believe she would point out that the individualistic Generation X that helped create the internet by challenging the established norms of the 1970s and 80, and who possessed the innovative prowess to create two generations of web companies is being replaced by a generation that is more likely to band together and hunker down for the nuclear winter. Hibernation, in a way. Those corrections are beginning to occur, I believe, as consolidations will likely become the name of the game. Welcome to the Machine!

Generational corrections beget societal corrections. Societal corrections merely reflect the mood of the workforce, the innovators and the money movers. When the finances dry up, the companies move into a mode of slow burn/slow growth as opposed to high burn/high growth, then business decisions are made safely. The Machine is safe. It is robotic and automated, programmed with computer-like precision. The Machine makes few (if any) mistakes, yet it is uncreative. It lacks pop and sizzle that innovators provide. When the society corrects itself away from innovation, it becomes precise and routine, but loses the juice that can be risky but productive. Welcome to the Machine!

If you’ve read this far and feel like I desire the demise of innovation, you have read me wrong. I do not. However, there are corrections happening that could last a long time (far beyond the 18 months experts think the economy will take to come back). It is a generational impact that could delay a proverbial Web 3.0 for 10 years or more.

With the trends of the incoming Presidential administration, my feeling is that the next generation of innovation could occur within the public sector itself, but won’t have the exposure or sexiness of that which was considered “hot innovation” in the last 20 years. Less private sector bling. More public sector growth.

What are your thoughts?

Social Media Quagmire

What happens when you build your business around a technology that disappears overnight? What happens when you build a client base, a pool of prospective clients or an otherwise niche demographic that is dependent on some other third party?

Many times it works out. Effective consultants have built their business on less than reliable third party access. However, there is an inherent risk that your way of life can change without any influence from you.

While Pownce has announced they are closing their doors (And we don’t really believe anyone outside of the Pownce four-some have built any kind of living around the microblogging service), I wonder what it would do to businesses built on the premise of Pownce availability?

The same goes for Twitter, where people have made an entire consultation around the use of Twitter. But what happens when Twitter goes away (and Twitter will go away at some point, undeniably without consultation with these consultants building their business on its existence)?

What happens when you as a consultant are hired to provide surefire, highly effective social media routines that will have a 95% possibility for 3-6 month positive effect on the growth and you recommend Twitter? And Twitter becomes 80% unreliable for an entire month, as it did in June and July?

What happens in a dying economy when companies want real returns and all you can give them is conversations with potential clients, and you have no solid way to convert those conversations into real customers?

Food for thought…

Doing the Most Good Means Smart Economics

There’s an old saying that goes something along the lines of, “When life gets good, throw a party” and that seems to be a mentality that translates to business today. Mainly the web business, if we’re talking about literal parties. No good web conference, un-conference or social-media laden city goes without parties of some sort. Here in DC, we have TechCocktail, the Twin Tech parties, etc. Anything to get people together and drink a little bit over business cards.

In the more figurative sense, we have people like Geoff Livingston, who suggest that social causes is a great place to drop your money. And to a degree, he is right. Whenever there is a crossover between means and opportunity, then action is mandated.

The lack of means, at this time when companies are trying to pipeline enough business and extend runway to survive 18 months, and employees are losing their job because the company can’t pipeline those funds, creates a situation where business owners need to take stock of options.

While social causes are always good, the return on investment is a giant question mark. Social causes can create huge bang, attract all kinds of positive publicity, vibe and reputations as Geoff suggests. Or it could simply have no effect at all, and thousands of dollars could be squandered on social cause.

Unless of course, social cause is the ultimate goal, smart operatives are looking at their economic scenario and becoming as efficient as possible. That means, investing in developers, or marketers. That means, hiring a high priced VP to replace 3 low-level managers to save salary cap. That means, pounding the pavement for more business even if it means having to travel a little more. These are optimizations companies go through to secure their future, when times are uncertain.

Certainly, if you have plenty of cash in hand and you’re looking for long-term investment opportunities, social causes gets you there. However, survival of the fittest dictates that sometimes you have to make the short term 3-yard scramble, over the longer 20-yard slot pass because the chance of success is greater. It’s a numbers game.