Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I was thinking whether it is a good idea to backup of all directories starting with dot in my home folder, so that all settings can be restored if anything goes wrong. I just had an instance when I had to clear the home folder as Ubuntu was not logging in. As my home folder is huge, I don't want to backup the entire thing.

  1. How can I backup just the .folders.
  2. Will there be any permission issue when I restore.

Is this a good backup option.

share|improve this question
    
Have you thought about using Ubuntu One? –  boehj May 8 '11 at 21:16
1  
have a look at this topic for a list of backup programs: askubuntu.com/questions/2596/comparison-of-backup-tools –  Rinzwind May 8 '11 at 21:24
    
This question might interest you. –  Takkat May 8 '11 at 21:27

3 Answers 3

up vote 1 down vote accepted

My trick for "just the dot files" is to use a path of .??* that is, dot followed by at least two characters. This avoids implicitly including the parent directory.

share|improve this answer
    
Thats a good one. I was able to backup by sudo cp -pr .??* /home/homebackup/ -v –  iJeeves May 9 '11 at 5:16

It's not too trivial, becuase if you try to specify hidden files as .*, you automatically include involuntary . and .. - the current and above directory.

tar -cjf configs.tar.bz2 $(find ./ -mindepth 1 -type d -name ".*")

I started the command from a testdir with ./ for find, because the browser-cache, which is quiete big, would take some minutes to be stored on my system.

share|improve this answer

Usually, I do backup to external HDD just several .folders simply by copying them in Krusader (I like this manager, because it recalls me old-time Norton Commander :) ). I personally copy the following folders:

  1. .mozilla (there are Firefox settings and other Mozilla stuff)
  2. .thunderbird (copy of offline backup of my emails)
  3. .skype (it's so easy to restore Skype setting and especially History by restoring this folder back)
  4. .dropbox

Of course, you can copy other folders (like gnome-related directories). But I like to configure it 'from scratch'.

Good luck.

share|improve this answer
    
Just one thing regarding permissions. There should be no questions if you preserve your user name intact. –  Vincenzo May 8 '11 at 21:28
    
@Vincenzo and even then, a sudo chown -R username ./* will do the trick –  crasic May 9 '11 at 0:34
    
@crasic Agreed :) I just looking from my 'personal computing point of view' :) –  Vincenzo May 9 '11 at 7:25
    
@crasic Wouldn't sudo chown -R username:username ./* be preferable by making sure the group also gets reassigned? –  Firefeather May 11 '11 at 1:08
1  
@Firefeather & carsic Thank guys for comments and suggestions. I will use them in my Linux-life :) –  Vincenzo May 11 '11 at 16:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.