LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-13-2020, 01:05 PM   #1
pinqvin
LQ Newbie
 
Registered: Dec 2008
Posts: 23

Rep: Reputation: 2
Question How to backup settings files for apps


Coming from Windows, as you might've guessed. Now I'm trying to compile my first-ever post-install bash script for Pop OS LTS 20.04. Questions along the way... pls bear with me:

# Where does Linux store configuration/setting files for various custom apps?
I've made a number of modifications to the following apps and now want to save config files for future re-installs or include the changes to my script. After some research, I've identified /home/.config directory as my #1 candidate for being the right spot for what I'm looking for but is it the only one?
I heard about the native rsync tool, as well as the apps Aptik and Mackup for backing-up and restoring Linux systems but are they helpful in my case, which is backing up only the config files, not the entire system?
Apps I've added to my system so far:
  • Audacity
  • Bleachbit
  • Brave browser
  • Calibre
  • ClamAV
  • Clementine
  • Gufw firewall
  • GNOME Tweaks
  • Inkscape
  • KeepassXC
  • LibreOffice 7.0
  • Stacer
  • VLC
  • WinRAR

PLUS changes to folder settings, GNOME and the system itself, etc...

# Can you please hint me a comprehensive resource where I can learn about adding changes in the config files to my bash script for future reference?
My goal is to automate both the re-installation of actual apps and adding/modifying their config files in the post-install stage. Like opening the config file, adding/modifying the necessary line and saving it after the app is installed.

Thank you!

Last edited by pinqvin; 10-13-2020 at 04:09 PM.
 
Old 10-13-2020, 01:15 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
I can't recommend a comprehensive list or resource, you seem to be making one by creating your list of where configurations are saved on a per application basis.

The pure static test is to restart clean for each one and ensure that the saved configuration you have, gets restored correctly. Another thing would be to check the modification dates for files.
 
Old 10-13-2020, 01:21 PM   #3
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,173

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
You are on the right track, .config will have most user settings. Instead of manually adding files to your backup, why not just backup everything in your $HOME and then just list any directories or files to ignore?

rsync and any of the tools built on top of it can he used to backup whatever files or directories you point it to. The first time you run it, everything will be backed up, then on subsequent runs only the changes.
 
1 members found this post helpful.
Old 10-13-2020, 04:08 PM   #4
pinqvin
LQ Newbie
 
Registered: Dec 2008
Posts: 23

Original Poster
Rep: Reputation: 2
Thank you! The search continues...
Btw, for those following the topic, I found another useful tip here: How To Back Up The Gnome Shell Desktop Settings
 
Old 10-14-2020, 11:22 AM   #5
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,140

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
Surely you are going to backup your personal files? If you do, then (as has been said) your configuration gets done a the same time. Of course, a general backup of $HOME does save a lot of browser history, thumbnails, and the like, but it's no real problem.
 
2 members found this post helpful.
Old 10-14-2020, 12:49 PM   #6
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
System-wide settings are in /etc
User-wide settings will be in "hidden" directories or files and these all begin with a 'dot'.

You will get thousands of files - but they are all very small.
There is no special tool that only deals in config info.

However, if you just backup /etc & all hidden files, these will include all config files.
You will also be including some non-config files -if you have a non-empty 'Trash' bin, this could be considerable.
Your Trash can be found in ~/.local/share/Trash, for example and ~/.cache/ contains an amazing amount of stuff.

Note that if you uninstall a package with the purge option, it will purge the system-wide config files in /etc, but not any user specific configuration.

I would expect the situation with these so-called "package managers" to be much more complicated - which is why I don't use them.
 
2 members found this post helpful.
Old 10-14-2020, 01:11 PM   #7
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
I just back up my /home directory, including the hidden files, on a daily basis and all I need to do is restore that backup, and all the settings are included. The one hidden directory you don't need to back up is .cache. That's a waste of space and time.
 
2 members found this post helpful.
Old 10-14-2020, 04:17 PM   #8
pinqvin
LQ Newbie
 
Registered: Dec 2008
Posts: 23

Original Poster
Rep: Reputation: 2
The more I live, the more I learn... Thank you, guys, indeed your tips are helpful!!!

I found another two tips (actually, links) that can help with restoring the system and user settings right after a fresh Linux install. You may find'em useful too, the keyword being 'dotfiles':

https://dotfiles.github.io/
https://wiki.archlinux.org/index.php/Dotfiles
 
1 members found this post helpful.
Old 10-15-2020, 09:30 PM   #9
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
I'll add this to the list:
https://dt.iki.fi/dotfiles
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
With Linux 4.15.4 or later several systemd services fail, like flush and partition services, for several distros fusion809 Linux - Laptop and Netbook 6 04-13-2018 11:23 PM
How to zip several files to several zip with one command? thomas2004ch Linux - Newbie 4 02-08-2010 08:13 AM
Resetting several Linux account passwords on several systems using Windows ssh Melindhra667 Linux - Enterprise 1 02-26-2009 07:38 PM
Several noob questions Easyrider Mandriva 1 02-15-2005 12:06 AM
Several noob ?'s version Linux - Newbie 4 06-15-2003 10:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration