PDA

View Full Version : [ubuntu] Which directories need to be excluded from an rsync of your home directory?



learningcurb
June 6th, 2009, 07:02 PM
I know that ~/.private and ~/Private should probably be excluded, as well as maybe ~/.gvfs, but are there any other special directories, such as ones generated by Gnome or KDE that need to be excluded?

73ckn797
June 6th, 2009, 07:11 PM
Those /home folders generally contain your settings info for the system. Thunderbird, Firefox, Evolution, Openoffice and other stuff that contain address books, bookmarks, ..... etc.

I you were to re-install Ubuntu you would have a back-up with all of the stuff you set which could be easily put back in the /home and your programs would be like before.

I have not used rsync but have backed-up certain folders for use on new installs. It keeps me from having to re-enter info in programs or going back through all of the settings previously created to my liking.

Creating a separate /home folder on another drive would be another way to have more secure data for those re-installs or other issues.

Sidewinder1
June 6th, 2009, 07:19 PM
I use Grsync, which is the GUI front-end of the rsync command (some winbloze users will never change :-) ) and I don't exclude anything from 'home'. Perhaps I'm doing something wrong, but, not to the best of my knowlege. I will warn you, however, that I've never had to restore via my back-up. Call it beginner's luck...

Side

tea for one
June 6th, 2009, 10:54 PM
I know that ~/.private and ~/Private should probably be excluded, as well as maybe ~/.gvfs, but are there any other special directories, such as ones generated by Gnome or KDE that need to be excluded?

Good evening

I also use Grsync and I do include everything in my home directory, however, I only use Gnome as a desktop environment.

I have successfully restored my home data to a new Ubuntu installation and I was pleasantly surprised to find all my customised themes, wallpapers, e mails and other personal data was intact.

Therefore, unless your home directory is enormous, I would suggest that you include everything.

learningcurb
June 7th, 2009, 04:08 AM
Hmm, well here's the thing. If you are using the encrypted private directory feature and you backup ~/Private, especially if you're using a backup system that creates multiple versions, you will be leaving lots of copies of your unencrypted data on those backups, which I recently found out. I was only testing out the encrypted private directory feature so it was no big deal, but it's certainly one of those gotchas.

The other thing is ~/.gvfs which is some sort of temporary directory that Gnome uses to mount archives and maybe SSH volumes and other things. It probably shouldn't be backed up. I don't understand the details of the other directories though. Some of them are obvious ~/.mozilla or ~/.openoffice.org, but others are cryptic like ~/.wapi or ~/.gnome2_private or ~/.dbus. Also ~/.cache probably shouldn't be backed up, but then again maybe it should be, I don't know.

rhodry
June 7th, 2009, 06:25 AM
Personally, I exclude anything that is .cache, .thumbnail or .Trash that is in the path of my backup.

Your .mozilla folder has a cache that is 50Mb by default. You could have just deleted an .iso file of hundreds of Mb to your Trash. Thumbnails folders can contain hundreds of files.

I know hard drive space is 'cheap-as-chips' nowadays but you really don't want all that sort of temporary rubbish clogging up backups. Rather than exclude the folders from the backup routine, you could write a little bash script to empty the relevant folders before you do the backup. Have a search in here and on Google for 'rsync backup scripts' and you will get all sorts of ideas as to how best to suit your needs. Also, if you want gui only with good include & exclude abilities, have a look at SBackup in the repos. Great little backup program.

Rhodry.

lavinog
June 9th, 2009, 10:18 PM
Thumbnails folders can contain hundreds of files.

I just deleted 800M (43000+ files) from the .thumbnails folder

I would exclude .gvfs. Anything in that folder is just a mounted filesystem. Worse case it could be the filesystem you are backing up to, and you will have a never ending backup. The -x (one filesystem) switch could be used instead of excluding it.

I exclude my firefox cache, but backup the rest of the profile. This saves my bookmarks, and history.
Also on one machine I use thunderbird, so I backup that whole folder.


On my laptop I can't always run a full backup, so I use find to make a list of files larger than 50M that get excluded, and backed up on the next iteration.