LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-12-2017, 12:20 PM   #1
lighter973
Member
 
Registered: Jan 2016
Posts: 34

Rep: Reputation: Disabled
Backing up home folder a good idea or not?


Hello, I've got so many individual program config files in my user account, Im thinking it maybe better to backup the whole user home folder. A good idea or no?
 
Old 06-12-2017, 12:23 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138
Sure, you may just want to exclude some specific folders that store sync'd email accounts, web browser cache, etc. for size reasons.
 
1 members found this post helpful.
Old 06-12-2017, 12:36 PM   #3
justmy2cents
Member
 
Registered: May 2017
Location: U.S.
Distribution: Un*x
Posts: 237
Blog Entries: 2

Rep: Reputation: Disabled
You can backup /home, but you should also backup /etc and /var/log for forensic purposes.
 
1 members found this post helpful.
Old 06-12-2017, 01:03 PM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Code:
echo $HOME or /home
?
 
1 members found this post helpful.
Old 06-12-2017, 01:10 PM   #5
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,887

Rep: Reputation: 467Reputation: 467Reputation: 467Reputation: 467Reputation: 467
I would add all of /var to that list.
If you use rsync to do the backup, it should be quite quick.
 
1 members found this post helpful.
Old 06-12-2017, 01:56 PM   #6
lighter973
Member
 
Registered: Jan 2016
Posts: 34

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Habitual View Post
Code:
echo $HOME or /home
?
sorry I didnt mean backup the whole of the /home directory, I meant a specific user folder within the /home directory.
 
Old 06-12-2017, 02:22 PM   #7
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2917Reputation: 2917Reputation: 2917Reputation: 2917Reputation: 2917Reputation: 2917Reputation: 2917Reputation: 2917Reputation: 2917Reputation: 2917Reputation: 2917
Quote:
Originally Posted by lighter973 View Post
sorry I didnt mean backup the whole of the /home directory, I meant a specific user folder within the /home directory.
You shouldn't feel the need to apologise, lighter973. Your opening post made it fairly clear what you were talking about (my emphasis):

Quote:
Hello, I've got so many individual program config files in my user account, Im thinking it maybe better to backup the whole user home folder. A good idea or no?
Just so I'm adding to the conversation, yes, I think that it's a good idea to back up your user's home directory just in case. It's also a good idea, in my opinion, to make regular images of your root, home, data and other partitions (depending on how you've set these up of course) to allow quick "roll-back" in case of system breakdown or infection.
 
1 members found this post helpful.
Old 06-12-2017, 03:25 PM   #8
trumpforprez
Member
 
Registered: Nov 2016
Location: UK
Distribution: Debian Jessie
Posts: 154

Rep: Reputation: Disabled
If you have your operating system on a hard disk drive (hdd), then of course the hdd could die after you've had it for some years.

In that case, it helps to backup the whole /home folder on a newer hdd.
Of course, you can backup to a new solid state drive (ssd) instead. However, an ssd is a lot more expensive.

What I do is to install a full linux operating system (OS) onto a cheap 16gb USB flash drive.
Then backup the /home folder from your hdd onto the OS on the usb flash drive.
This way, if the hdd dies then your /home folder still survives on your cheap flash drive.

Of course, you don't need to install an OS onto the usb.
You can just create several partitions on the usb which will hold newer versions of your /home folder.
This is because you will add/delete stuff in your /home folder each month.

The reason I install a full linux OS onto the usb is because... I have a new OS! I can install different programs, different browsers etc. The distro can even be different!
 
1 members found this post helpful.
Old 06-12-2017, 04:33 PM   #9
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
No worries here.

Please consider https://www.debian.org/doc/manuals/d...p_and_recovery as a generalized guide.
 
1 members found this post helpful.
Old 06-19-2017, 04:09 PM   #10
WFV
Member
 
Registered: Apr 2012
Location: somehow, somewhere
Distribution: Arch
Posts: 193

Rep: Reputation: Disabled
examples with rsync
Code:
rsync -aAXhv --delete /home/me/Documents/ /mnt/homebkp/home/me/Documents/
you can always pass the n opperand for dry run -aAXhvn
and for the ~/.* stuff minus web-browser cache (this one is so so...)
Code:
rsync -aAXhv --delete --progress --exclude={google-chrome/*,mozilla/*,thumbnails/*} /home/me/.* /mnt/homebkp/home/me/
These are assuming the backup drive is mounted in /mnt/somewhere
it generally is a good idea to keep backups.

EDIT:: as also mentioned in thread rsnap, runs something like this (using rsync):
Code:
rsync -aAXhv --exclude={/dev/*,/home/*,/media/*,/mnt/*,/proc/*,/run/*,/srv/*,/sys/*,/tmp/*,/lost+found} /* /mnt/path/to/snapshot/$(date -I)
establishes a base backup of root that can be incrementally backed-up however, when I've tried the incremental backups tied to the base, they tend to be almost as large as the base so I may have something wrong in the rsync script - had to abandon incremental backups as run out of disk space, in lieu of deleting base backups no longer needed and running the rsync above (new base / backup). This does not backup $home.

Last edited by WFV; 06-24-2017 at 03:07 PM.
 
Old 06-19-2017, 07:54 PM   #11
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Mineral, Virginia
Distribution: Debian 8
Posts: 7,893

Rep: Reputation: 339Reputation: 339Reputation: 339Reputation: 339
Quote:
Originally Posted by lighter973 View Post
Hello, I've got so many individual program config files in my user account, Im thinking it maybe better to backup the whole user home folder. A good idea or no?
I suggest backing up as much as possible. The limiting factor is how much space you have available for your backup files. I backup everything on my main operating system and data partition every day. I backup my secondary operating system and data partition once a week. For both backups I keep three generations of backup. Using rsync, a backup (after the initial backup run) takes about two minutes and while a backup is running I usually browse the Internet in a different desktop.

I have been doing this style of backup for fifty years on a variety of hardware and operating systems and I have never been in the position of trying to scrape the data from a lost file off a hard drive.

----------------------
Steve Stites
 
Old 06-23-2017, 03:46 PM   #12
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by jailbait View Post
I suggest backing up as much as possible.
Oh, at least once.
https://wiki.archlinux.org/index.php...kup_with_rsync
 
Old 06-23-2017, 06:12 PM   #13
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.8.2003
Posts: 5,426

Rep: Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054
Learning and using rsync is always good. For full-system backups, I use and recommend rsnapshot, which uses rsync to build and maintain delta backups as configured. I do daily, weekly, and monthly backups to an off-site server dedicated to that purpose.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it a good idea to share a home partition between Windows and Linux? CamTheSaxMan Linux - Laptop and Netbook 20 02-10-2014 05:51 PM
Backing up home folder? evilc77 Linux - Newbie 6 03-09-2008 09:56 PM
HOME DNS server good idea or not? hewittrj Linux - Networking 7 10-20-2007 09:13 PM
Good idea/bad idea: interface colors introuble General 5 10-30-2006 01:33 PM
/home/ on fat32 fs - a good idea? mandrakemikael Linux - Newbie 4 09-03-2004 06:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration