LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   back up users home folder? (https://www.linuxquestions.org/questions/linux-newbie-8/back-up-users-home-folder-609402/)

paperplane 12-27-2007 09:21 AM

back up users home folder?
 
hi,

id like to know if its a good idea to back up a users entire home folder (to a tar.gz file), so that if the system goes down for any reason and needs to be completely reinstalled, i could just drop the users home folder back into /home. just thought id ask for opinions and see if there was any reason why this might not be such a good idea.

issinho 12-27-2007 09:29 AM

My 2 cents' worth
 
I would say that there should be nothing wrong with that. The thing you want to be careful of, however, is to verify that the backup is good. Also, if the server crashed because of something sitting in your home directory, creating a backup could cause the same issue when you rebuild.

Hope this helps

paperplane 12-27-2007 11:10 AM

thanks issinho :)

b0uncer 12-27-2007 12:10 PM

It's definitely a good idea. Usually you can get everything else (like installed software) back from the internet reposities/install disc, but home directories aren't "available" unless you make backups of them - the other grand thing to back up is system-wide configuration files, but if you don't take them, you'll only lose time, not anything you can't replace. Therefore I'd say backing up home directories is the most important thing to do on a machine that has user accounts that are actively used.

Remember, though, that usually each home directory contains a lot of configuration files/directories (whose filenames start with a dot, so they're hidden by default), and you should consider if you want to keep them too or not: they might not take much space (as most of them are plaintext files), but do spare your user-specific configurations (like theme settings); on the other hand, if moved to an "alien" environment (if you for example backup user's home dir in Ubuntu, then move it to some other distribution which is completely different - different desktop environment etc.), it just might be that not all of the configuration files co-operate well. Most of them should, some of them might not be used at all, and some might cause funny actions, especially if the configuration files were for (very) different program versions than the system they're put on later. Anyway they're easy to delete (deleting the config files/directories doesn't cause trouble, they're then just re-created with "factory settings" - a newly created home directory is often empty anyway), so it's not a bad idea to take backups of them anyway. Just make sure that whatever method you use (like tar and some compression program), it must back up the dot'ed directories as well, not just those that are "visible" (some programs don't care about filenames that begin with a dot, unless instructed otherwise).

Home directories are also maybe the most often changing places on the system, so backups should be taken more often than not. Weekly might not be often enough, but it depends on the system. If you do plan to take frequent backups, I suggest one "full" backup, and after that "changed" backups, that only store what is changed after the last backup. This way the later backups are usually a lot smaller than if you'd back everything up always, and they don't contain already-taken data. Drawback is that if one backup is lost, it's data is lost - so it's a good idea to take "full" backups from time to time (but not every time), to be sure.

If /home is not on it's own separate partition, backups of home directories are a must. And even if it is on it's own separate partition, it's good to have the data secured.

paperplane 12-27-2007 03:25 PM

thanks for the info b0uncer, i will go ahead and backup :) it will save me alot of time and effort, not having to start from scratch everytime.

BTW, just want to say if it wernt for you helpful guys on the LQ forums answering my many questions in the past (under different usernames), i could never have got my system to a place where tonight i just sat there and looked at the screen and thought 'yeah, i feel comfortable with linux now :)

so thanks very much to those who answer questions, this is a really nice community to be a part of :D

masonm 12-27-2007 03:45 PM

It's always a good idea to back up the stuff you know you wouldn't want to lose.


All times are GMT -5. The time now is 12:52 PM.