大网数据广告活动
服务器运维问答

Is there a way to gather system configuration changes since installation?

· 52CE 我爱测

In my attempt to replace a Linux server that was set up a few years ago I realised that nobody knows exactly what was installed/configured since. The only thing I have in git is the nginx sites definitions. What options do I have…

问题原文

原帖链接 · bosch · CC BY-SA 3.0

In my attempt to replace a Linux server that was set up a few years ago I realised that nobody knows exactly what was installed/configured since. The only thing I have in git is the nginx sites definitions.

What options do I have to compare a running server with a clean installation?

I'd like to use Ansible for versioned configuration management but before that I need to get information regarding services installed and their configuration files, firewall rules, users/groups, ssh keys, domains setup, etc, I don't even know what to think of. I can see a /data folder so this is simple but it holds www data, elasticsearch data, and nodejs apps, which means there is a node installed, pm2 and elasticsearch. I found traces of a Jenkins installation but it is not running. I can see a fail2ban service so this needs to be moved as well.

Is there a way to see in a glimpse what has changed since the initial setup? I'd like to replace this Ubuntu 14.04 with a clean 16.04 using Ansible playbooks to avoid this kind of chaos, maybe dockerize some services as well, while preserving current functionality.

已采纳解答

原帖链接 · fuero · CC BY-SA 3.0

First and foremost: I recommend starting from a clean slate.

Identify the services still in use from the logs or from user interviews, isolate their configuration and set them up on a new box.

Don't waste your time on digging out this box's history.

Adressing your question in more detail:

You may gain some information about what was changed on your system from your logs, but the information is certainly incomplete.

Depending on how the box was set up, root's .bash_history, /var/log/apt.log, and /var/log/audit/audit.log might help, but they can only provide clues not give you complete insight.

dpkg -V will give you an idea which system packages' config files were changed.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-06-01)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。