I need advice: Backing up dot-files but also system-files

Hey there,
im a not very advanced Linux (and GitHub) user and went through the process to sucessfully backing up my dotfiles.


  • I take the files (somewhere in my home-folder) and cut/paste them into my local github dotfiles-repository
  • I execute a self-created script to automatically create symlinks from these files to the destination where they came from
  • Than i can change these files and commit it to my private repository

→ So far nothing new due to the fact that this seems very common (and is working fine) as seen in several tutorials

Thinking about …

… also backing up other files from my system which are not placed in the home-folder e.g. like my nvidia-x-server settings file placed at

I think its not a good idea to cut/paste such files which should only be managed by root-user and shift them to some users home directory
→ Am i right?


  1. Creating a script which does not symlink, but simply copy the relevant files (with folderstructure) into a local github dotfiles-repository before comitting
    CON: Redundant files; Danger of accitently configuring copy-files and not source-files; Danger of breaking my system because i don’t know what im doing :sweat_smile:
    PRO: System files stay inside the folders as it sould be (including permissions etc.?); Less chance to break the system

  2. There is no need / its not good practice to backup particular system-files like this

I was just thinking about this, could not find something by searching the web / this board so maybe someone can give me a good advice.

Thanks a lot

What about using a real [backup](https://wiki.archlinux.de/title/Backups) solution instead of a git-file ?

  • I do use snapshots (with btrfs and snapper)
  • There is timeline
  • or backuppc
    When using automatic snapshots, it is not only possible to do a complete rollback, but as you do with the git-files it is possible to access every single file in every snapshot

Snapshots can be used with any single partition/mountpoint. You don´t have to use them allover. (I do have separate snapshots of / and /home )


OK im already backing up my /home and / with timeshift
You are right, i could go and search on my backup drive for older versions

I like to have the opportunity on GitHub to have a very powerful version-control, comment every commit and go back to see what ive done

Git is way more powerfull then any backup-solution. At some point in time i did use cvs to store /etc :wink: For conf(textfiles) this is really nice

When changing configfiles, i do allways insert my changes like:

#msk 16.11.2021 this seems only to work when using one seat
PasswordAuthentication no
PermitEmptyPasswords no

over the line where i make the changes. So when i look into configfiles and search for “msk” i find all my doings

OK i understand that GitHub using for my random files throughout the systems could be a solution if think i need it

Basically its just one solution beneath others

Indeed. That’s why there’s so many dotfile tools floating around out there.


As far as i see all of these tools are working via symlinks
Not sure if i want to risk this throughout my whole system

Thanks for the help and im going to find a solution for me :wink:

I have been experimenting with three approaches - all of which can copy (sync) instead of (in addition to) symlinks (sort of).

  1. The first one I used was the bare git approach (How to store dotfiles | Atlassian Git Tutorial) but applied to my root file system. It worked ok, but I didn’t like it for some reason. Mostly that it was hard to see what was being tracked.

  2. The second was to use dotdrop (dotdrop). This tool can diff the changes. But I found that for my personal dotfiles I also had a hard time seeing what was in git and what wasn’t without symlinks. It can do symlinks and a whole lot more, but its sync first and symlink second as far as paradigms goes. It was also a bit slow.

  3. So, at the moment I have fallen back to my favorite which is dotbot (GitHub - anishathalye/dotbot: A tool that bootstraps your dotfiles ⚡️). I am currently using it to symlink my home dotfiles, but it has a plug-in for rsync (which I haven’t tried yet) that I plan on using to keep my system config files in sync with. I did like dotdrops diff tool though, so that might be a something that sends me back to #2 when I get around to testing this part out.

edit: fixed link.

1 Like

When using btrfs, these files are protected because of the CoW-nature of btrfs


1 Like

Sorry, the second link is wrong: dotdrop. Dotdrop by default copies between your git repo and a location. It also has capabilities to diff between the two and install, import, or update the files.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.