Getting Started with JARVYS Backups

I previously interviewed the creators of JARVYS, a Linux backup solution that makes backups and restores as easy as a single command.  I wanted to post a follow-up to show just how easy it is to setup and use on a Linux system.  I’ll be using a virtual server running Debian 7 as my test environment and I’d like to disclose that JARVYS is a sponsor of this blog.

Sign-up to Back-up

If you haven’t registered to receive a free account with JARVYS, head over to their plans page and signup.  Please note that if you checkout with the coupon code “linux-blog” you’ll get 20% off any paid plan.   However, I know most of you will want to test drive the car before purchasing so the always free plan is a good starting point that will give you 3 backups that you can restore from.  Once you’ve done that, head back here and let’s get started.

60 Seconds to Lift-Off

After verifying your email, Log-in to your account at JARVYS and you’ll land on your user dashboard.  Your dashboard is where all the information regarding your backups will be contained.  At the very top, there is a curl command that you can copy and paste onto the system you want backed up.  Execute that command which should look similar to this:

sudo curl --silent --data '{"user_api_key":"long_hash_value_with_numbers_
and_letters_unique_to_your_account"}' https://v1.jarvys.io/setup/ > jarvys-setup.sh && sh jarvys-setup.sh

In between the quotes above will be a long hash key that is unique to every user account.  Obviously, you’ll need curl installed on your system and you’ll need to have sudo privileges to initiate the command (or root access).  You’ll also need a few other things:  tar, ssh-keygen, and rsync.  Most systems already have those installed so most will be ok…but if you’re on a bare server like me, you might have had to install one or two of those first.

Once you’ve initiated the curl command, that’s it.  JARVYS is installed and configured to run backups.  JARVYS will run an initial backup within 1 hour of the installation command above and there are sane defaults on what it backs up.  As an example, it won’t back-up your /proc or /sys directory…but it’s possible you might want to hone in on a single directory tree to backup.  In this case, doing some more post configuration will help and I’ll go over that below.

JARVYS-VISUALFor those of you who just want everything backed up, you’re done.  You initated the command and BOOM!  That’s it.  JARVYS will backup daily for you and with the free plan, you’ll have 3 backups that you can restore from.  You’ll be able to setup email notifications on your dashboard for each system you have backing up (see left).  You’ll also be able to see how much space you’re using with your snapshots.  Please keep in mind that each time the backup runs, it rotates the oldest snapshot out of existence.

If you want to initiate a manual backup, the command is jarvys backup.  Pretty simple stuff.  For those of you who would rather not backup EVERYTHING, let’s move on to configuration below.

 

Advanced Configuration of JARVYS

JARVYSconfigJARVYS tries to keep it simple with advanced configuration.  If you look at /var/jarvys/etc/include you’ll find that directories listed with a minus sign in front of them will not be backed up and directories with a addition sign will be.  By default, JARVYS backs up everything except /proc and /sys as you can see inside of the configuration file (see right).

You can add other directories you don’t want to backup or ones that you do…just keep in mind that this is for advanced users.  For me, I want to backup everything inside of /var/www/ as all of my web stuff is there.  In this case, I’d exclude comment out the three lines shown in the picture above.  Next, I’d add the directories I want to backup in the corresponding section of the configuration file:

+/var
+/var/www
+/var/www/**

This means that the only directories I’m backing up is all files in the /var/www path.  Next, I’d uncomment the line that states:

# - *

The line above, if commented with the ‘#’, will not be read…uncommenting it means we delete the ‘#’ and then save.  This means JARVYS will exclude everything except what you have listed with a + symbol.  In our case, it will exclude all things except those listed above in /var/www and the sub-directories.  So my finished configuration page will only have the following lines uncommented:

+/var
+/var/www
+/var/www/**
- *

If you have further questions on how to do this, please leave a comment below and refer to the JARVYS documentation page.

Restoring Files with JARVYS

Let’s go through what a restore with JARVYS is like.  I’m going to manually perform a backup right now of my newly configured JARVYS install that I just configured in the ‘Advanced Configuration’ section above.  So I’ll initiate a command:

 jarvys backup

Now I’m going to do something either really smart or really dumb depending on how you view it.

rm -rf /var/www/linux-blog.org/logs

The command above removes all of my error and access logs for my website.  Now I’m going to restore these files with JARVYS:

jarvys restore /var/www/linux-blog.org/logs/ 1

JARVYS will make sure you are absolutely certain that you want to do the restore and then will restore your files into the directory /root/jarvys-restore and from there you can move your files in their entirety from there.  It’s as simple as that.

Are There Any Caveats?

Sure there are.  There always is!  For one, you can’t delete snapshots from a host that is no longer valid.  As an example, if you have 2 Linux servers…perhaps one as Test and one as Production…and you destroy the Test box after a few months of testing…you cannot get rid of this system from your JARVYS status page.  This means that the last 3 snapshots from that client are never going away.  I contacted JARVYS support about this and they said they could manually remove it for me.  They also said that features were in the works to give you granular control over your backups/snapshots including removing clients.  We’ll have to see what happens.

Secondly, I didn’t notice where JARVYS restored my files the first time I restored them.  I think part of the reason was the scrolling text on the screen but also because my eyes weren’t drawn to the text stating where they were restored.  I also mentioned this to JARVYS support and they stated that they would pass this along and thought it was a really great idea to highlight the restoration folder.

In closing, the support is fantastic and they are open to suggestion to improve things…which is great for any product.  It’s easy to get started and is really a ‘set it and forget it’ backup solution.  The company puts Linux front and center which is a nice change for backup solutions.  If you’d like to give JARVYS a try, head on over and signup for their free plan.  If it’s everything you hoped it would be, you can use the code ‘linux-blog‘ during checkout and you’ll get 20% off for the lifetime of your subscription.  Thanks again for reading!

A Lightweight Low-Battery Warning Monitor for GTK+ 3.x desktops

A laptop’s battery gives us the comfort of storing power which we can use later. However, sometimes this comfort turns into pain.  For example, if we take our laptop with us, thinking that it’s charged (but it actually isn’t), or if we leave our laptop powered on and it silently turns off resulting in the loss of valuable work.

It is with this in mind that a programmer developed a simple battery monitor in Python with the following capabilities:

  1. The program should be customizable and lightweight.
  2. It should work in the background without any disturbance.
  3. It can allow the user to set a minimum charge threshold.
  4. Upon reaching that threshold, the program should not only display a desktop notification but also play a sound to force the user to plug in the charger.
  5. When the charger is connected, it should stop the notifications immediately but remain running to watch for future problems.

The program has been tested on Arch, Ubuntu and Mint, so, if this sounds like something you’d be interested in, why not give it a try!

JARVYS, Set It and Forget It Linux Backups

Wouldn’t it be great if there was a cloud based file backup system that put Linux FIRST?  One that made it so we didn’t have to use FUSE?  One that didn’t put out a Windows client first and the Linux client was an afterthought?  One that you could get installed and configured quickly and easily which would allow you to ‘set it and forget it’?  Me too!

Until a few weeks ago…I wasn’t sure something like that existed.  Then I was approached by the founders of JARVYS, a backup software solution that does just that.  I had a chance to interview Cade Proulx and Matt Connor of JARVYS to understand a bit more about how it works, where it is headed, and why its perfect for those of us who develop on Linux.  I’d like to disclose that JARVYS is a sponsor of this blog.

Q:  Tell us a little bit about yourselves?

A:  Matt has been using and developing with Linux for around 15 years and I’m (Cade) a gamer at heart (MOD creation, Rig building, etc).  We met at Chapman University and began to take our start-up ideas into reality with SSD Nodes, JARVYS and Xerq.io.  We’re active in the venture capital and start-up scene; not only for ourselves, but also helping others to get started.

Q: Where did the idea of JARVYS come from?

A: We have a company named SSD Nodes that provides on-demand datacenter services, specializing in reliable, high performance cloud computing. We provide a massive dynamic platform that allows you to quickly innovate and deploy your applications on a global scale.  With that being said, our customers had a need to do small file level backups with a way to easily restore.

Q:  So is JARVYS only for people who need datacenter level services?

A:  Not at all.  The idea for JARVYS is to provide a quick (you can get installed and backing up in 60 seconds) and easy way for end users to get started with backups.  We wanted to provide a very low barrier for entry on these types of backups and restores…to make it so that people can get to working with what matters to them instead of worrying about backups.  JARVYS will work on servers or desktops…it doesn’t matter.  What matters is that JARVYS gets out of the way and lets you do your work while it continues to back your important stuff up.

Q:  When was JARVYS founded?

A:  We’ve been using the idea and backup solution with most of our customers at SSD Nodes for a long time…but JARVYS as a company and product only came to be in August or September of this year.  It was at that time we really made the code modular and cleaned it up enough to make it presentable.  We’re still in beta right now as we’re introducing some great features like zero-knowledge encryption.

Q:  How did you come up with the name “JARVYS”?

A:  JARVYS is a very popular name in the French language and we thought of JARVYS as a butler of sorts.  It seemed fitting that our software just took care of the backups for you…much in the way a butler would if you had one.

Q:  How many people work on JARVYS at the moment?

A:  We currently have 7 employees and growing.

Q: So what programming language do you use for JARVYS?

A:  Golang mostly.

Q:  Is there an API for end users to build on or a plugin system?

A:  Not yet, but in the future we plan on having a very robust API and plugin framework.  We really want people to build things on top of JARVYS.

Q:  What are your ultimate goals for JARVYS?

A:  We want JARVYS  to make dataloss a thing of the past.  We’ve seen so many customers mess up backups and lose data. There are so many holes with data preservation. There are so many moving parts to a backup such as  the restore, notifications for success and loss.  And of course, a backup system isn’t complete until you’re able to restore your data.  It is our hope that JARVYS takes the difficulty out of the backup for Linux users.

Q:  Let’s say I’m a customer and I install and get started today.  What happens to my data/backup?  Is it encrypted?  

A:  The JARVYS client uses an encrypted SSH tunnel to transmit your data to our servers here.  We’re still in beta right now but ultimately we’re looking at an encrypted storage place for everyone’s data.  We want this to be YOUR data…we want to make it so that you hold the keys to the kingdom and not even JARVYS can see your files or decrypt them.  We’re not there yet but we are currently developing and testing this ‘zero knowledge’ storage system right now.

Q:  Do you have a free plan?  If so, will it always be free?

A:  Yes, we have a free plan.  We feel that with developers and the  Linux community that there should always be a free plan.  It’s important that we contribute and give back because we’re standing on the shoulders of giants.  It just makes sense that if we take, we should give.  So we’ll always have a free plan that can get you started with hassle free backups within 60 seconds.

Q:  What would you say if someone asked “Isn’t this just another Dropbox?”

A:  We’d say that it really isn’t like Dropbox at all.  For example, with Dropbox restores aren’t going to be seamless with a single command like they are with JARVYS.  Dropbox also has a daemon that runs and it uses FUSE on Linux.  JARVYS is cron enabled and only runs when the backup happens.  It’s designed to have a very small footprint.  Restores with JARVYS take less than a few seconds while restoring files with Dropbox will take quite a bit longer.

Q:  How do I keep up to date with JARVYS releases and news?

A:  You can find us on Twitter, Facebook, and Google+.  You can also keep up with JARVYS on our Blog.

Q:  Where can I check out JARVYS?

A:  You can get started using the free plan we mentioned above.  As we said, it’s free and will always be free.  Alternatively, we’re offering a special for Yet Another Linux Blog readers:  20% off, any tier plan for the lifetime of the plan.  It’s a great deal!  To take advantage, simply use the code “linux-blog” at checkout.  Head over to our pricing page to get started.  We hope JARVYS takes the hassle out of your backups and thanks for checking us out!

How To Patch The Debian 6 Squeeze Shellshock Bug

Debian I run a few webservers at work that are internal facing only (intranet) that run Debian 6 Squeeze.  I’ve been monitoring the Shellshock exploit since it was discovered a few weeks ago and have been looking for a way to get those few systems patched…despite them existing only internally.  Patches for Squeeze-lts (long term release) were released quickly and then just a last week, another patch was put into play as well.  I decided to go ahead and patch these internal systems and since I couldn’t find much out there for blog posts on how to do it…I decided to share how I did it.

Difference Between Squeeze and Squeeze-lts

The difference between Squeeze general and Squeeze-lts is that the LTS (long term support) repositories will continue to receive backported patches from the current release tree (which is version 7 for Debian).  I didn’t originally install/setup these two internal servers so the first thing I have to do is get the version of Debian these servers are running and then check to see if they are using the LTS repositories.

Finding Your Version of Debian

lsb_release -a

This command returns a vanilla squeeze install for me.

Changing Repositories to LTS

Now to see which repositories are enabled.

nano /etc/apt/sources.list

You should open your sources list with your favorite text editor.  If you just have vanilla sources like the two servers I have you can just comment out the sources listed there and paste the following:


deb http://http.debian.net/debian/ squeeze main contrib non-free
deb-src http://http.debian.net/debian/ squeeze main contrib non-free

deb http://security.debian.org/ squeeze/updates main contrib non-free
deb-src http://security.debian.org/ squeeze/updates main contrib non-free

deb http://http.debian.net/debian squeeze-lts main contrib non-free
deb-src http://http.debian.net/debian squeeze-lts main contrib non-free

Now that your sources have changed, update and patch your system:

 apt-get update && apt-get upgrade && apt-get dist-upgrade

Checking To See if You still Vulnerable

You can use bash itself to see if you’re vulnerable to the bug.  Execute the following command:

env x='() { :;}; echo vulnerable' bash -c 'echo hello'

This should return the following if you are patched:

bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `x'
hello

If you’re not patched…the word ‘vulnerable’ will appear in your results.

Further Reading on Shellshock

You can read further about how to switch to LTS repositories here:  https://wiki.debian.org/LTS/Using

For more reading on the Shellshock bug, how it is being exploited and the history/timeline, see here:  http://www.troyhunt.com/2014/09/everything-you-need-to-know-about.html

Netrunner – The Best Distro You’ve Barely Heard Of

Netrunner

In my quest to find a professional and polished distribution of Linux that used KDE as the default desktop…I tried out quite a few flavors:  Kubuntu, Salix, Manjaro, PCLinuxOS and even OpenSuse.  All done in the past few weeks.

Each time I installed these distributions on this Dell Latitude D630 I pretended I had no idea how Linux was supposed to work.  I’d step through like a less than technical person would do.  How do I connect to wireless?  Is it easy?  Can I stream Youtube videos?  Will my mp3 collection play?  How do I manage that mp3 collection?  Will DVD’s play?  Do things ‘just work’ out of the gate?

I blogged about the beginning step in Manjaro Linux…it wasn’t as polished as I’d like.  I jumped next to Salix and found that Wicd, the default network manager…makes you jump through 9 different hoops to connect to a hidden network.  PCLinuxOS came next but it was so slow on this laptop that it lasted less than a day.  OpenSuse repeated the PCLinuxOS slowness.  Kubuntu was last and it was fine and polished…but once again, slow…random hangups when doing things like file browsing/web browsing.  Kubuntu was the closest I came to a great KDE flavored distribution…it stayed on the laptop for a couple of days.  So the question remained:  Can the distribution I am running be considered professional and polished while getting out of the way

The majority answer for most of these distributions is a resounding “NO”.

One distribution however, stood above the rest of them.  Instead of stopping on one of the above questions…I found myself having to create new and more intricate ones.  This distribution wasn’t holding me up…it was pressing me forward.  THAT is what a distribution of Linux should do.  It should be out of the way and allow you to get on with your business.  The distribution that does this the best out of that handful mentioned above is Netrunner.

The Hardware

I have an old Dell D630 Laptop which was a standard business line laptop from Dell circa 2007 or so.  It’s got an Intel Centrino and I loaded it up with 4 GB of RAM.  It has a 40 GB Hard drive in it and an Nvidia Quadro graphics card.  Overall, nothing special.  It’s very Linux friendly overall and I’ve used numerous distributions on this laptop since I picked it up at a liquidation sale.

Installation

netrunner2Netrunner uses the Manjaro installer.  Manjaro is based on Arch Linux.  Normally when people think of Arch Linux, they think of a very technical distribution that is only for the Linux elite.  The installer for Netrunner shuns the idea that you need to speak binary to install it.  Simple choices are laid out for you…I was able to encrypt my hard drive and didn’t need to know how to partition anything to get it moving.  The wizard was, simply put, phenomenal.  It was a well put together and excellent installer.

 

Day to Day Use

I’ve found Netrunner to really and truly be out of my way.  I don’t have to think to use it.  I open up music and play it.  I watch movies with no issues.  I browse Youtube videos without a thought.  Flash video just works.  When I pop in a USB Drive, it detects and mounts like I’d expect it to.  Overall, the operating system gets out of my way.  I normally use Openbox for my Linux laptop and I’ve actually gotten used to using KDE because of how polished Netrunner rolling is.

One of my favorite things about Netrunner rolling was Octopi, the graphical front end for pacman.  This tool allows you to manage all the packages on your system and to search out new ones.  It also allows you to manage AUR packages as well.  While this might not be something the average user would dive into right away…having been an Arch and Manjaro user before…I found it fantastic to have a “one stop shopping” experience via Octopi.

The overall speed of the distribution is fantastic.  I found none of the slowness that plagued the laptop during the testing of other distributions.  Things were quick and crisp when opening.  The only time I experienced slowness was when I had about 15 browser tabs open and was trying to open GIMP (I also had KDE Telepathy, Konversation, and dolphin open in the background).  Overall, I’ve found the speed quite acceptable.

Conclusion

My overall conclusion with Netrunner Rolling is that there is no better Arch platformed Linux distro with KDE as the default environment out there.  It just works.  It gets out of the way and it gives the end user a clean, crisp and efficient desktop right out of the gate.  You don’t have to know binary to get it installed, updated, and running.  You don’t have to sacrifice a goat to Cthulhu (I’ve heard that comes later?) to have a pleasing KDE experience for your desktop.  I keep saying this, but it just works.

I found it really odd that I hadn’t heard very much about Netrunner in the past but I readily admit that I hadn’t kept up with KDE based distributions in the past few years due to my fascination with Openbox.  Netrunner has won me over though…I will definitely be paying attention to this fine distribution in the future as it has taken its place as the top KDE distribution I’ve ever tried.  I hope you’ll give it a try in the future (if you haven’t already) and kudos the developers and community of Netrunner!

 

Manjaro KDE Notes

manjaro kdeThis week I decided to step up from Window Manager Manjaro Openbox and give the latest version of the Desktop Environment in KDE try.  I’m one of those odd people who love minimalist desktops like openbox, xmonad, and i3 but still have a soft spot in their hearts for KDE.  We’re few in number and many with insanity. :)

So I downloaded Manjaro KDE edition and installed it onto my Dell Latitude D630 laptop.  Upon first boot, everything looks professional and nice.  The bootscreen is professional and the desktop has a common theme that is pleasant to look at.

 

Then I went into the menu to see what programs come installed by default.  Bleh…everything with a bag of chips, the receipt, and then even more.  Too much mess.  Multiple entries for single programs.  It’s a mess in there.

4 entries for the ‘Marble’ program greet me inside of the ‘Education’ area.  FOUR?  This is very simple to fix…you simply right click the menu button and choose ‘edit applications’ but how does something like that make it past the QA process?

Sound was muted across the board by default….I’m pretty sure this is just due to my sound hardware but it’s important to note that not everyone will know to look for that.

Desktop effects enabled by default means that things were DOG slow until I installed a video driver.  Not a good first experience.

I attempted to download a few torrents out of the gate to see what kind of throughput KTorrent would give me.  I use magnet links mostly and upon grabbing my first torrent I realized that nothing was happening.  The metadata wasn’t even downloading.  So I attempted a restart of the application with no fix.  I tried logging out and back on with no fix.  Then I tried a restart of the entire PC with no fix.  No matter what I did…torrents wouldn’t download.

So I switched to qBittorrent.  Still no fix.  No matter what happens, torrents don’t work for me with this version of Manjaro.  In my previous version they worked just fine.

About this time, i started to get rather irritated and stopped looking around for things that were wrong.  No offense to the Manjaro KDE guys…but this isn’t a very good implementation of KDE in my opinion….there is just too much installed by default and what is installed doesn’t seem to work well.  There were quite a few other oddities I experienced while exploring the desktop including multiple KWin crashes when launching specific applications.

Overall, I wasn’t happy.

So I’m heading over to Salix KDE now to see if a simplified approach to KDE will cleans the palate so to speak.  I neglected screenshots when testing Manjaro KDE out but I’ll take many with Salix and follow up here.