View previous topic :: View next topic |
Author |
Message |
pankaj13 n00b
Joined: 05 Sep 2019 Posts: 25
|
Posted: Mon Sep 16, 2019 5:33 am Post subject: Gentoo configuration backup |
|
|
Hi,
I am very new to Gentoo so still finding my way around documentation but loving it so far!
Based on my experience of pfSense (BSD), one things that helped me was the ability to save configurations as things invariably go wrong with new stuff. But I was able to backup configurations at regular intervals and restore the system if things go horribly wrong.
Is there any way to back configurations on Gentoo? In other words I am asking that is there an easier way to restore your previous version should you do install something new or mess around with config files?
Thanks, |
|
Back to top |
|
|
Prof. Frink Apprentice
Joined: 07 Jan 2017 Posts: 176
|
Posted: Mon Sep 16, 2019 6:23 am Post subject: |
|
|
Hey,
here is a command, that lists only your configuration files, in case you want to backup only them, maybe this helps:
Code: | equery l "*" | cut -d "]" -f 2 | xargs -i equery f --filter=conf {} |
|
|
Back to top |
|
|
pankaj13 n00b
Joined: 05 Sep 2019 Posts: 25
|
Posted: Mon Sep 16, 2019 10:22 pm Post subject: |
|
|
The script does pick up the configuration files individually, I am planning to tweak it a little and run it for backing up few critical configuration file.
But it seems there is no official package that help restore using config file....which is fine but I had to ask to make sure that I am not making life harder than it needs to be!
Thanks for sharing the script, it is pretty cool! |
|
Back to top |
|
|
Prof. Frink Apprentice
Joined: 07 Jan 2017 Posts: 176
|
Posted: Tue Sep 17, 2019 11:07 am Post subject: |
|
|
Hey,
okay, nice that you like it. You may backup the config-files likes this, but how you restore them, depends on you and your system.
Code: | equery l "*" | cut -d "]" -f 2 | xargs -i equery f --filter=conf {} | sed '/ * /d' | xargs -i rsync -avR {} /path/to/backup/dir/ |
|
|
Back to top |
|
|
|