Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo configuration backup
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
pankaj13
n00b
n00b


Joined: 05 Sep 2019
Posts: 25

PostPosted: Mon Sep 16, 2019 5:33 am    Post subject: Gentoo configuration backup Reply with quote

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
View user's profile Send private message
Prof. Frink
Apprentice
Apprentice


Joined: 07 Jan 2017
Posts: 176

PostPosted: Mon Sep 16, 2019 6:23 am    Post subject: Reply with quote

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
View user's profile Send private message
pankaj13
n00b
n00b


Joined: 05 Sep 2019
Posts: 25

PostPosted: Mon Sep 16, 2019 10:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
Prof. Frink
Apprentice
Apprentice


Joined: 07 Jan 2017
Posts: 176

PostPosted: Tue Sep 17, 2019 11:07 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum