# home folder, what to backup and what not

hello all. i am thinking of starting to keep an incrmental backup of my home folder. however i dont really know which folders should i not backup, in case i need to format my machine and reinstall fedora. for example, in my home folder there these folders and files, hidden and not:

[odorf@localhost ~]\$ ll -a
total 4276
drwx------.  43 odorf odorf    4096 Feb 14 23:13 .
drwxr-xr-x.   4 root  root     4096 Nov  1  2013 ..
drwx------.   3 odorf odorf    4096 Aug  1  2014 .adobe
drwxrwxr-x.   2 odorf odorf    4096 Dec 18 00:20 .argouml
-rw-rw-r--.   1 odorf odorf     162 Feb 11 04:32 .asunder
-rw-------.   1 odorf odorf   18876 Feb 14 23:03 .bash_history
-rw-r--r--.   1 odorf odorf      18 Jul 21  2014 .bash_logout
-rw-r--r--.   1 odorf odorf     193 Jul 21  2014 .bash_profile
-rw-r--r--.   1 odorf odorf     777 Feb 12 00:15 .bashrc
drwx------.  22 odorf odorf    4096 Feb 14 09:34 .cache
drwx------.   8 odorf odorf    4096 Feb 11 04:28 .claws-mail
drwxrwxr-x.   3 odorf odorf    4096 Dec  8 16:53 .composer
drwxr-xr-x.  49 odorf odorf    4096 Feb 12 23:07 .config
drwx------.   3 odorf odorf    4096 Feb 14 04:06 .dbus
-rw-r--r--.   1 odorf mail  1219720 Feb 14 04:53 dead.letter
drwxr-xr-x.   5 odorf odorf    4096 Jan 25 03:27 Desktop
drwxr-xr-x.  13 odorf odorf    4096 Feb  9 00:58 Documents
drwxr-xr-x. 559 odorf odorf   36864 Aug 23 17:48 .dvdcss
-rw-------.   1 odorf odorf      16 Jul 27  2014 .esd_auth
drwxr-xr-x.  24 odorf odorf    4096 Dec  4 02:36 .gimp-2.8
-rw-rw-r--.   1 odorf odorf      61 Aug 17 13:27 .gitconfig
-rw-------.   1 odorf odorf      59 Aug 18 12:54 .git-credentials
drwx------.   3 odorf odorf    4096 Sep  4 00:43 .gnome
drwx------.   3 odorf odorf    4096 Feb 14 22:29 .gnupg
drwxrwxr-x.   2 odorf odorf    4096 Feb 12 23:29 .gstreamer-0.10
-rw-rw-r--.   1 odorf odorf     209 Jan 25 03:27 .gtk-bookmarks
-rw-------.   1 odorf odorf   21080 Feb 14 00:58 .ICEauthority
drwxrwxr-x.   4 odorf odorf    4096 Dec 11 18:28 .java
drwxr-xr-x.   3 odorf odorf    4096 Jul 27  2014 .local
drwx------.   3 odorf odorf    4096 Aug  1  2014 .macromedia
drwxrwxr-x.   4 odorf odorf    4096 Jul 27  2014 .mozilla
drwxrwxr-x.   2 odorf odorf    4096 Aug  1  2014 .mplayer
drwxr-xr-x.   4 odorf odorf   49152 Aug 19 21:41 Music
drwxrwxr-x.   7 odorf odorf    4096 Aug 18 18:50 .nbi
drwxr-xr-x.   5 odorf odorf    4096 Jan 15 18:47 Packages
drwxr-xr-x.  20 odorf odorf    4096 Dec 27 21:15 Pictures
drwxrw----.   3 odorf odorf    4096 Jul 31  2014 .pki
drwxr-xr-x.   2 odorf odorf    4096 Feb 11 17:50 Public
drwx------.   2 odorf odorf    4096 Sep 24 12:35 .ssh
drwxr-xr-x.   3 odorf odorf    4096 Aug 26 10:49 Templates
-rw-rw-r--.   1 odorf odorf   51917 Feb  9 22:30 test
drwx------.   4 odorf odorf    4096 Jan 20 02:12 .thumbnails
drwxr-xr-x.   7 odorf odorf    4096 Feb 11 04:32 Videos
drwxrwxr-x.   4 odorf odorf    4096 Dec 18 00:51 .WebIde80
-rw-rw-r-- ...
edit retag close merge delete

Sort by » oldest newest most voted

I simply recommend backing up the entire home-folder including hidden files and folders. (Backup space is so cheap that it probably doesn't hurt to backup everything.)

Hidden folders contain things like your email folders and settings, your firefox bookmarks, your picture and music database, your store passwords and GPG keys, Gnome extensions, Virtual machines, Settings for each application, and much more. Why loose this?

If you want to save little space, you can exclude ~/.thumbnails (it will easily and automatically be regenerated on a new system), and the Trash: ~/.local/share/Trash/.

EDIT: (Thanks to @hmaarrfk 's comment): If you are doing a remote backup you probably want to exclude .cache too.

more

This post here could also be interesting for you. It mentions ways to backup more than just /home. It can be useful to backup a list of all installed packages, and also the settings in /etc/

( 2015-09-22 10:28:49 -0600 )edit
2

If you are doing remote backups, you probably want to skip the .cache folder.

( 2015-09-22 13:55:45 -0600 )edit

It really depends on your goals. If your goal is to have an identical system in the event of a disaster you should just back up everything.

Unless you have any custom configurations in any of the hidden dot files, I would suggest only backing up your actual documents and data. You can typically get rid of most of the hidden files and nothing really breaks since these files are recreated by the original program that made them if they do not exist.

more

1

That is not entirely true. For example, if you are using Mozilla's Firefox and Thunderbird, all your bookmarks and emails (settings, and folders) and are stored in hidden directories. If you are using shotwell as Image Viewer/Manager, your picture database is stored in a hidden folder. Same for music database (rhythmbox or so). And so on (GPG keys, gnome-keyring, gnome extensions...)...

My recommendation is: Save all files and folders, including the hidden ones.

( 2015-09-22 09:33:50 -0600 )edit

You list all the files and folders in your home folder, but I'll generalize somewhat for other users.

So those are taken care of for you.

Other than that, you'd want to think about any programs which you spent time configuring, either by editing text files or looking through the preferences menu, and back up those. For example, I customized the window layout and shortcuts for GIMP, so I always make sure to backup the .gimp-2.x/ directory. If you install any games from the Fedora repos, they generally save your progress in their dot folders too, but if you play any games installed from Steam, then Steam should sync the game progress for you.

Some programs might put their configuration files in a subdirectory of .config/ instead of directly under your home folder.

If you've downloaded any extra fonts, they might be stored in ~/.fonts, unless you installed them from yum or dnf.

Generally what I do is just look through all the "dot" files and folders, and save a backup copy of everything that looks related to something I use very often. If I don't use it all the time anyway, it probably won't be a big deal if the app preferences reset to their default.

But, if you have the storage space, it doesn't hurt to just backup everything.

more