Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
There’s No Place Like /home… Be Sure to Back it Up!
#1
Unix-like operating systems such as Linux employ a standardized filesystem layout that keeps user data separate from the rest of the system directories. Most of the time, you’ll find your personal files and settings for the programs you run in /home/your-username. Other users who have accounts on the same machine also have directories within /home. Anything outside of /home is generally considered to be owned by the system administrator who is called “root.” You yourself might be root but on Ubuntu based systems you simply masquerade as root by invoking sudo before commands. The root account itself isn’t really activated on Ubuntu for security reasons.

Another key concept of Unix systems is the idea that each file on the machine is owned by someone. Any file you create in you personal /home directory will automatically belong to you and you will alone will have full privileges for that file. You usually can read files stored on other parts of the system that you did not create but trying to write to or delete those files most often results in an error message. You can copy such files to you home directory and then do whatever you like with the copy but you can’t delete or change the original without having ownership of the file or invoking root level privileges.

This line between OS and user files means that the only place that per-user settings can be stored is within their own home directory… That means that the only part of the system you technically should ever need to backup is what’s in the /home directory. The rest of the system can be quickly reloaded starting with a fresh install and then you can add any programs you’ve added to the system. Next, restore your /home directory and then you should be back to where you were before. Software that takes system snapshots do the exact opposite. The backup system files only and allow you to roll back the state of the OS without effecting anything in /home.

Once you wrap you head around how all of this works, you then realize that there’s no need to “clone” an entire system… As a matter of fact, cloning is a lot less reliable than simply creating a backup of what’s in /home. It can take hours to clone a system with a lot of data while taking incremental backups of user data usually takes under five minutes once you get it all copied over on the first backup because you're only backing up the changes from then on.

There’s a a lot of backup software for Linux but I tend to like to keep it simple and open. I have written a couple of such utilities that run in the terminal. The latest is BU which creates snapshot style backups of everything in /home on you machine and it’s stored in the open, not in big files that you need the original software to access.

BU also goes on and backs up the /etc directory. This is where a lot of system-wide settings are stored in Linux. Having a backup of /etc and you'r /home is usually all you need to completely rebuild a desktop Linux system...

You can find out more about BU on GitHub. It’s free and easy to get started with.

https://github.com/EzeeLinux/bu-usb_backup_tool
-- Your Fearless Leader!

Reply
#2
Joe, I want to "Thank you" for the utilities that you have posted for us to use to protect our systems...
You and Jeremy have saved my butt more that once in my Linuxness travels...

If I had $10 bucks for every time I Foobared Mint 18.3 and reinstalled it, that could be a easy $100 bucks... LOL...

After 2 years of the Linux world one thing is certain, I will Foobar it again and use XBT/BU and CYA to fix it once again... Lol

Oh! Don't forget "UP"....

Thanks Guys for covering my Ass(ets)..... }:-)

LLAP
**********************************************************
Taglines of the BBS Days:
Today is the tomorrow you worried about yesterday. 
  Everybody remember where we parked. - Kirk
    Not everything in life is a 1 or a 0.
       Experience enables you to recognise a mistake when you make it again...
Reply
#3
(08-30-2019, 05:57 AM)bescott9944 Wrote: Joe, I want to "Thank you" for the utilities that you have posted for us to use to protect our systems...
You and Jeremy have saved my butt more that once in my Linuxness travels...

If I had $10 bucks for every time I Foobared Mint 18.3 and reinstalled it, that could be a easy $100 bucks... LOL...

After 2 years of the Linux world one thing is certain, I will Foobar it again and use XBT/BU and CYA to fix it once again... Lol

Oh! Don't forget "UP"....

Thanks Guys for covering my Ass(ets)..... }:-)

LLAP

Thanks. I'm glad we could help! Smile
-- Your Fearless Leader!

Reply
#4
(08-30-2019, 09:41 AM)EzeeLinux Wrote:
(08-30-2019, 05:57 AM)bescott9944 Wrote: Joe, I want to "Thank you" for the utilities that you have posted for us to use to protect our systems...
You and Jeremy have saved my butt more that once in my Linuxness travels...

If I had $10 bucks for every time I Foobared Mint 18.3 and reinstalled it, that could be a easy $100 bucks... LOL...

After 2 years of the Linux world one thing is certain, I will Foobar it again and use XBT/BU and CYA to fix it once again... Lol

Oh! Don't forget "UP"....

Thanks Guys for covering my Ass(ets)..... }:-)

LLAP

Thanks. I'm glad we could help! Smile

I agree.  It is nice to know the utilities help others.
Jeremy (Mr. Server)

* Desktop: Ubuntu MATE
* Windows are for your walls, Apple is for your health, Linux is for your computer
Reply
#5
(08-29-2019, 01:27 PM)EzeeLinux Wrote: BU also goes on and backs up the /etc directory. This is where a lot of system-wide settings are stored in Linux. Having a backup of /etc and you'r /home is usually all you need to completely rebuild a desktop Linux system...
That's just perfect!

I know some things like customized system-wide systemd daemons go to /etc, and I almost forgot that I have to backup that, too Smile
My top 10 reasons to still use Arch after 2 months on my main PC at home.
Reply
#6
I want to echo that sentiment, several times in this recent trip down Linux Lane, Jeremy and others in this group have saved me from myself. Thank you.
LinuxMint 19.2 (Cinnamon)
Lenovo B570
Intel Pentium B950
circa 2009
Reply
#7
Read my sig line to see how I feel about backups.

Heck, I essentially keep backups of my backups.
Jeannie

One has to be proactive, not reactive, to ensure the safety of one's data so backup your data! And RAID is NOT a backup!
Reply
#8
(09-06-2019, 06:08 AM)John Swisher Wrote: I want to echo that sentiment, several times in this recent trip down Linux Lane, Jeremy and others in this group have saved me from myself. Thank you.

Thanks.  That's awesome the community is helping out.



(09-06-2019, 10:41 AM)Lady Fitzgerald Wrote: Read my sig line to see how I feel about backups.

Heck, I essentially keep backups of my backups.


I agree.  A true backup is more than one copy on separate "systems" and media.  A single "backup" is only a copy.  I, too, keep rotating multiple backups across multiple hardware and systems.  So if one fails there are others.
Jeremy (Mr. Server)

* Desktop: Ubuntu MATE
* Windows are for your walls, Apple is for your health, Linux is for your computer
Reply
#9
(09-06-2019, 01:41 PM)cleverwise Wrote:
(09-06-2019, 06:08 AM)John Swisher Wrote: I want to echo that sentiment, several times in this recent trip down Linux Lane, Jeremy and others in this group have saved me from myself. Thank you.

Thanks.  That's awesome the community is helping out.



(09-06-2019, 10:41 AM)Lady Fitzgerald Wrote: Read my sig line to see how I feel about backups.

Heck, I essentially keep backups of my backups.


I agree.  A true backup is more than one copy on separate "systems" and media.  A single "backup" is only a copy.  I, too, keep rotating multiple backups across multiple hardware and systems.  So if one fails there are others.

For each computer data drive I have in my computer, I have a set of four backup drives: two of each set are kept onsite (powered down and disconnected from the computer at all times, except while updating the backup, and stored in a drawer away from the computer) and the other two are kept in my safe deposit box at my credit union. I swap them out no less than once a month to ensure the offsite backups are as up to date as practical.

It seems anal (heck, it is anal) but I have yet to lose any data due to a drive dying, something going south, or me getting the stupids (the latter I blame on old age).
Jeannie

One has to be proactive, not reactive, to ensure the safety of one's data so backup your data! And RAID is NOT a backup!
Reply
#10
I like to create a System Image on an External HDD say once a month...this way everything is backed up...if disaster strikes like HDD failure or I brake something and can't Re-Boot [Image: t3603.gif] I just place the Image back in about 15-20 mins with nothing lost.   [Image: m19042.gif]
Linux Forever...Windoze Never       [Image: t12701.gif]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)