How To: Have A Proper Backup Of Your Data

In today’s article, we’re going to show you how to have a proper backup of your data. I’ve wanted to write this article for a while. Few people have a solid backup strategy and many people have no backup strategy at all. Read on while I try to share how to make a proper backup.

In the world of backups, you have some pretty extreme measures. On one hand, you have people who don’t backup any of their data. On the other hand, you have companies that are spending millions of dollars for constant incremental backups sent to disparate sources.

Somewhere between there is a ‘proper backup’. This is a backup of your data that’s reliable and inexpensive. It’s something you can do without investing a whole lot of money. It’s something you can do by just following a few simple rules.

For this exercise, we’re going to be using the ‘3-2-1 backup‘ method. After much research, and some pretty tragic data losses, I’ve concluded that the ‘3-2-1’ method is probably the best way to make a proper backup.

You can do this with any software you want. We won’t actually even discuss software in this article. You can use cut and paste, if you really want. The software process doesn’t matter for this article, oddly enough.

So then, let’s discuss this…

Decide What Data Is Important:

The first thing you need to do is figure out what data is important to you. 

For example, I don’t really backup any of the system’s files. I don’t do drive images. I never perform a backup of my operating system. Instead, I back up my personal files. (I haven’t hosed my OS in ages and I really don’t worry about doing so.)

I back up some text files that I’ve been working on for years. For example, I back up my pictures of friends, family, and locations. If anything, I back up more than I care to, because I’m kinda lazy in these regards. 

See, all I do is backup my /home/<user> directory, and all the directories and files within that directory. That’s it. That’s all of it. Doing it this way does mean I end up with stuff like my ~/Downloads being backed up needlessly, but disk space is cheap these days.

Why? I want my individual config and data files along with my personal files. So, I keep my home directory backed up. If the operating system fails, it’s just a few minutes to install the OS again – and another few minutes to move my backed up home directory to the fresh installation. That saves me all sorts of time configuring the new installation – which is typically done on a new device.

So, you need to decide what data is worth backing up. When you do that, you now need to learn about making a proper backup.

Decide Your Backup Frequency:

It’s up to you to decide how much data you’re willing to risk losing. You can’t sit there backing things up all the time (realistically, you can – if you’re using software to make constant backups in real time, but that’s computationally expensive and financially expensive).

Be realistic about this. You don’t need to be a hoarder in the physical world, and there’s no really good reason to be a hoarder of digital data. (I’m one to talk, one of the biggest bits of data I back up is my email – some of which is more than 20 years old!) I urge you all to be considerate when deciding what is worth preserving. If you’re never going to use the data again, there’s no reason to preserve it. If it can be easily recreated, you may not want to preserve it.

I would say that, as a general rule, I’m willing to lose a week’s worth of data – but I do have some redundancy. If it’s important, like family pictures, there will be the copy on the camera, a copy on external media, and a copy on the computer I’m using. Otherwise, I tend to do my backups once a week, usually on Sunday.

Everything else? Meh… Once a week is a good frequency for me. That’s been my effective schedule for a long time. Sometimes I’ll backup more frequently, because of a major change. Sometimes I’ll not have any special data and will let my backup schedule lapse a little.

This is a decision you’ll have to make. Which data requires redundancy?

Use 3-2-1 To Make A Proper Backup:

The 3-2-1 backup method is basically saying that you should have 3 backups at any one time. So, at any moment in time, you should have 3 backups.

You should have 2 copies of your data at your physical location. You have the one that is on the computer you’re using and another can be an external drive. (In case of drive failure.)

You should have 1 backup that’s off-site. You might think that a garage is a good spot and, for some people, it is. If it’s a detached garage, it’s unlikely to go up in flames if your house burns. But, what if there’s a flood? If there’s a flood, it’s likely to take out your garage at the same time it takes out your house.

Remember, these are the *important* files we’re concerned with. Think of all the worst eventualities and prepare for them.

If you have a friend that lives a distance away, swap disks with them every week/two-weeks/month. This way, you both have backups in separate locations.

Remember, the goal is redundancy. 

You can also use a safe deposit box at your bank. You can also set it up so that you can send your files to your friend’s house (onto your hardware) over the internet. Additionally, you can also use cloud storage. 

If you’re concerned about your private data being out there, learn to use encryption. Use your favorite search engine and learn how to encrypt your data. These days, it’s pretty easy. You can just compress your whole backup and encrypt that file, meaning it can’t be opened without the password.

Test Your Backup!

You need to verify that your backups are working. It is vital that you properly test your backups. In reality, you absolutely need to verify that your backup strategy is effective.

AN UNTESTED BACKUP IS NOT A BACKUP!

You don’t have to write the data back to your drive every time. After all, you have three copies to work with. But, you should consistently and regularly verify the integrity of your backups AND your recovery strategy.

After all, a backup by itself is nothing. You must also have a recovery strategy. That is, how do you get your data back after a catastrophic loss? How are you going to recover after a fire?

It could be as simple as downloading a disk image from the ‘net, to retrieving your drive from the garage and writing the data back to your new computer/fresh installation. But, if you haven’t tested that to ensure it’s working, it’s the same thing as having no backup at all!

For the umpteenth time:

RAID is NOT a backup!

Be Diligent:

A proper backup regimen requires diligence. Once you start on this path to making proper backups, you need to keep doing it. It’s up to you how often you do this, but you do need to adhere to a schedule – if you actually want the system to be effective.

You have a lot of choices to make. You get to decide all the things from frequency to location, from the data you want to preserve to storage devices you will use. We live in great times, as far as hardware is concerned. You can buy additional storage space for dirt cheap. Software choices abound.

Over time, you may find yourself having more confidence and reducing the types of files you that need redundancy. That’s not necessarily a bad thing. For example, you don’t really need to backup your desktop background image, but you do probably want to back up the last pictures you took before a family member passed away.

IMPORTANT:

You can exceed all of this. You can be more diligent. This can be improved upon, if you want to be even more diligent. Increased redundancy can be a great thing.

Think of this as the *minimal* backup strategy. The least you should have is 3-2-1 backup process listed in this article. It’s perfectly okay to have more than that. It’s perfectly okay to have multiple redundant off-site locations. It is absolutely perfectly okay to use both a buddy’s house and a reputable cloud storage company. You do need to be diligent, doing the backups as often as you’ve decided and doing that consistently. 

You get to make all those decisions. They’re your decisions to make. The value of your data should dictate your level of redundancy. The value of your data should dictate your frequency. Find the software that works for you, the locations that work for you, and the file types that you feel need to be preserved.

Closure:

There you have it. You now know about the 3-2-1 backup method. There are other sites that cover this, but I wanted to share it with my readers here and in my own way. It seems important that my readers know how to have a proper backup strategy.

Also, I’ve been meaning to write this article for a while, but I knew it was going to be pretty long. As you can see, this one is definitely one of the longer articles. I hope you enjoyed reading it as much as I enjoyed writing it – but I mostly hope you take this information to create a proper backup process that provides the redundancy you’ll need should you suffer catastrophic data loss.

Hopefully, this is also going to be a useful link for when we see people who have failed to backup their systems and now are facing data loss due to making that decision. Yes, they made a decision to not back up their data. If they didn’t back up their data, they either listened to bad advice or didn’t listen to good advice. Ideally, this link will point ’em back in the right direction.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Show A Random Fortune When You Open Your Terminal

In today’s article, which should be a short one, we’re going to learn how to show a random fortune when you open your terminal. This should be pretty quick and easy, easy enough for anyone to follow. Read on, my delightful readers!

NOTE: You gotta be using bash for this, as evidenced by the use of ~/.bashrc.

Why this article? Well, I am having some connectivity issues and I want to ensure I get you a nice article while I have the connection to do so. I don’t want to count on enough time to write a longer article.

Besides, it’s another good day for a fun article. I am 99% confident that this article will teach you nothing of value! And that’s okay. It’s just you having fun – and having fun is always a good idea. So, this article will just be a bit more of that, some more fun…

First, you should read the previous article and follow the directions. That’s gonna be necessary for the next part. After all, you can’t get a random fortune when you open your terminal unless you’ve installed some software to do that. So, read this article:

How To: Display Your Fortune In The Terminal

Did you read that? Did you install ‘fortune’? Good… Now we can get into this article!

How To: Show A Random Fortune When You Open The Terminal:

Sorry about the ugly headline. Gotta optimize for Google, I guess.

This article requires an open terminal, like oh so many other articles on this site. Just press CTRL + ALT + T and your default terminal should open.

With your terminal now open, we’re going to edit the ~/.bashrc file to make it show a fortune when you open the terminal. We’ll be using nano to do so, and that’s an easy enough process.

NOTE: You don’t need sudo for this, as you already own this file.

With nano opening your ~/.bashrc file for editing, you just need to scroll to the very bottom. When you get to the bottom of the file, just add the following line:

Next, you need to save the file. To save the file with nano, press CTRL + X, then Y, and then ENTER.

Now, you need to reload your bash profile. That looks like:

Now, that should reload the terminal and profile, showing you a ‘fortune’ quote. If you want to be really sure, or if doesn’t show you a fortune, just close your terminal and open it back up again. When you open your terminal again, it should definitely show you a fortune. See? Pretty easy! It’s darned near magical!

Closure:

And there you have it. You now know how to show a random fortune when you open your terminal. ‘Snot all that hard, now is it? If I’ve gotta bang out an article with intermittent connectivity, we might as well have fun with it! Thanks for reading and we’ll get some more serious content coming up – or will we?!? I should have decent connectivity soon. It can’t stay down forever, can it?

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

How To: Display Your Fortune In The Terminal

Today’s article is just a silly article, one where you learn how to display your fortune in the terminal. It’ll be fun! It’ll also be quick and easy, probably. If you’re expecting anything serious, this is not the article for you. No… No, it is not!

Once in a while, we remember that all work and no play makes Jack a dull boy. Well, we don’t want to be a dull boy, so let’s do something that serves absolutely no benefit. Let’s just have unadulterated fun. It’s my site, I’ll do what I want!

To be fair, I’ve already cover this same topic. I shared how to use ‘cowsay’ with ‘fortune’. I suppose it’s cheating, but this time we’re just going to use the ‘fortune‘ aspect. Trust me, it’s a very different article.

Yes, it’s an excuse to have a quick and easy article. I had an easy article the last time and I still want an easy article. I don’t want to burnout and we’ve had more than 300 articles. So, an easy spell is nice. It’ll help prevent burnout. I’ll be over it in a day or two, I assume. (Note that I didn’t promise.)

Remember, a goal of the site is to be found by search. So, having a ‘fortune’ specific article isn’t a bad thing. Not everyone will want the silliness of ‘cowsay‘. (They not very fun people, but they’re people and they exist!)

So then, let’s just get going with the silliness…

Display Your Fortune In The Terminal:

Obviously, you need an open terminal! It’s right there in the title! If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

With your terminal open, you need to install ‘fortune’. It’s probably available for those using apt and those using rpm based package managers. It may be available for others, but I have not checked. So, to install it:

On apt-based distros:

On rpm-based distros:

With ‘fortune’ happily installed, and feel free to try in other package managers – but leave a comment if they work, you can start with the basic ‘fortune’ command:

Now, as this is just a fun article, I’m actually going to cheat. I’m going to suggest you just use the man page to learn more:

See, this is why I wanted to cover ‘fortune’ by itself. There are a whole lot of options available for such a silly program. Of all of them, my favorite one is the -l flag. That one throws out longer fortunes, like this one:

See?!? The ‘fortune’ command is pure awesomeness! If you’re anything like a cat, or myself, you can bat at the fortune command (as though it was a balled up piece of paper) for way longer than what seems reasonable.

So, check that man page and have fun with ‘fortune’. For example, you can (with the default configuration – and you can do way more with ‘fortune’ than one might ever possibly wish) run one of the following commands:

So, have fun with it. I do! I revisit the command far more often than one might think a grown adult would. Even then, and my memory kinda sucks, I don’t think I’ve read them all. It’s a gift that keeps on giving.

Closure:

And there you have it… You can now display your fortune in the terminal. I mean, it’s probably not really your fortune – but that doesn’t mean you can’t have some fun with it. Life is short, but not too short to have some fun in the Linux terminal.

By the way, like the last article, this article was prompted by an recent article on a forum I frequent. Nobody mentioned the ‘fortune’ command, so I figured I’d return to it and try to give it some justice. It’s a fun application with way more  options than it needs – and that’s awesome.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Let’s Learn A Little About The ‘dir’ Command

In today’s article, we’re going to learn about the ‘dir’ command. The ‘dir’ and ‘ls’ command are quite similar, but ‘ls’ seems to get all the press. So, today we’ll be looking at the ‘dir’ command. It will be a relatively short article (I suppose) and easy enough for new people to follow.

You’re possibly already familiar with the ‘ls’ command. I’ve written a variety of articles about ‘ls’. We’ve used ‘ls’ in numerous articles along the way. Here are a couple of ‘ls’ articles:

Some Fun With Sorting The Output Of ‘ls’
Let’s Use ‘ls’ To Sort Files By Time

Those are just a couple. WordPress, the backbone of this site, isn’t very good at searching for just two characters like ‘ls’. That’s for good reason and I’m not sure if that behavior can be changed.

Ah well… Root around and I’m sure you’ll find more. I’ve written about 300 articles and can’t possibly remember them all!

Anyhow, we’ll be using the ‘dir’ command in this article. It describes itself pretty well in the man pages, and is similar to the ‘ls’ command. It describes itself as:

dir – list directory contents

So, if you’re familiar with the ‘ls’ command, you’ll find ‘dir’ to be quite similar. I’m sure there’s a reason that both exist – I’m just not sure what that reason is, nor am I sure why both are included by default. Feel free to let me know your thoughts or theories!

Edit: See this link to see why Linux contains both.

Well then, let’s get on with it…

The ‘dir’ Command:

Well, you shouldn’t need to install anything for this article, but you will need to have an open terminal. By now, you know how to open the terminal if you’re a regular reader, but others need only press CTRL + ALT + T and their default terminal should open.

With your terminal now open, let’s just start with the basics. If you just enter the ‘dir’ command it will output a list of all the visible files in that directory. It looks like:

You can also specify a directory, like:

If you want to show hidden files, you can try this:

If you want to list things in a single column, in a list format, you can just add the -l flag. This also shows the file’s permissions and modification time. So, you could try:

If you want to list files with the ‘dir’ command and to do so recursively (digging into the folders within folders), you can do that too. All you need is the -R flag. So, for example:

That’s just scratching the surface of the ‘dir’ command. There’s a whole lot more that you can do, so just try the man page for more nifty tricks  you can do with ‘dir’.

If you have any questions or nifty ‘dir’ information, please feel free to leave a comment. It’s a pretty handy command to have on hand, much like ‘ls’.

Closure:

And there you have it. You have yet another new article, this one about the ‘dir’ command. It’s not terribly complicated and it’s another tool to toss into your toolbox. You never know when you might want to use it instead of the ‘ls’ command, though they’re awfully similar.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Find The Boot Processes That Slow You Down

In today’s article, we’re going to show you how to find the boot processes that slow you down. What you do with this information is up to you. You can opt to tweak and try to speed up the boot process, or you can just learn to live with it. It shouldn’t be too long – or too hard.

Note: This article assumes you’re using systemd. If you’re not, get with the program!

With modern computers, even those a decade old, I don’t really understand the fascination with speeding up your boot process. This is especially true with Linux. After all, how often are you booting? People spend 3 hours improving the boot time by 3 seconds!

using uptime to show how long the system has been running
As you can see, I do not reboot all that often, pretty much only as needed.

Even if you reboot every day, unless your boot time is so slow that it’s indicative of a problem, you can always just press the power button as you walk by the computer to get your morning coffee.

This article is aimed towards those who have a slow boot problem. It’s aimed at you people who have slow boot times, boot processes that slow you down without good reason. People interested in optimizing their boot time can also benefit from this article, but that’s not the point.

Also, this article isn’t going to show you what to do next. This article will just be showing you how to find the boot processes that slow you down. The steps you take from there will vary based on your problems or your objectives.

Find The Boot Processes That Slow You Down:

Like oh so often, this is a trip down Terminal Lane. We do a lot in the terminal on Linux-Tips! It’s great to get new users to get comfortable with using the terminal. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

With your terminal now open, we can take a look at the boot process. To do so, let’s start with a basic command:

Picking one of the slower devices in my stable, you end up with an output similar to this picture:

output from systemd-analyze
That’s rather middle of the road, I would assume. You can get much faster and slower.

With that information, you can see how long it takes to reach ‘userspace’. For most folks, that’s going to be the number you’re interested in – as it’s when you can graphically interact with the system, usually to login to the system.

I should also mention that that’s not the total boot time. The computer has its own boot process. This time only includes what happens after POST, as the Linux operating system takes over. It doesn’t include how long you saw the original computer’s OEM logo/boot screens or anything like that. Your real-world boot time will be slightly longer.

So, let’s have some more details and see how that startup is actually working. Let’s see how long it takes for each step of the boot process. To do that, you’d want to look at the following command:

Yup, it’s a bit of clever naming. It’s systemd letting you know what process(es) to blame for a slow boot time. Pretty handy, huh?

If you want, you can even make a nifty picture of the boot process – a picture that includes showing  you the dependencies needed to complete the boot process. 

That’ll output an image that’s quite large, to large to bother including, but it’s easy enough to understand. If you’re having serious issues booting, that image might be something you can share with a forum when you’re asking for assistance.

What steps you take next will depend on your individual situation. If you’re looking to speed up your boot process, you can mask services that you don’t need. If you’re having problematic services and/or dependencies, your situation will be different and require different fixes.

Closure:

And there you have it! You have another article. This article tells you how to find boot processes that slow you down, so it’s an article that could be helpful to all sorts of people. Once you have this information, you can start looking to make changes. It’s a handy way to get boot process information with systemd.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Subscribe To Our Newsletter
Get notified when new articles are published! It's free and I won't send you any spam.
Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.