# Restoring emptied /etc/postfix/virtual using rebuild-map

**URL:** <https://forum.virtualmin.com/t/restoring-emptied-etc-postfix-virtual-using-rebuild-map/136943>\
**Category:** Help! (Home for newbies)\
**Created:** [April 3, 2026, 7:52am UTC](https://forum.virtualmin.com/t/restoring-emptied-etc-postfix-virtual-using-rebuild-map/136943 "2026-04-03T07:52:03Z")\
**Posts on this page:** 10\
**Page:** 3

<div class="post-metadata">

**Author:** ![shoulders](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/shoulders/32/10086_2.png) [@shoulders](https://forum.virtualmin.com/u/shoulders)\
**Post date:** [April 15, 2026, 1:17pm UTC](https://forum.virtualmin.com/t/restoring-emptied-etc-postfix-virtual-using-rebuild-map/136943/41 "2026-04-15T13:17:29Z")

</div>

No, I was just chipping in with my use case, but a UI for this is a great idea.

---

<div class="post-metadata">

**Author:** ![shoulders](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/shoulders/32/10086_2.png) [@shoulders](https://forum.virtualmin.com/u/shoulders)\
**Post date:** [April 15, 2026, 1:22pm UTC](https://forum.virtualmin.com/t/restoring-emptied-etc-postfix-virtual-using-rebuild-map/136943/42 "2026-04-15T13:22:34Z")

</div>

Within the UI make it possible to download the revisions, not just compare and replace with those on the server.

---

<div class="post-metadata">

**Author:** ![Ilia](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/ilia/32/10185_2.png) [@Ilia](https://forum.virtualmin.com/u/Ilia)\
**Post date:** [April 15, 2026, 1:35pm UTC](https://forum.virtualmin.com/t/restoring-emptied-etc-postfix-virtual-using-rebuild-map/136943/43 "2026-04-15T13:35:26Z")

</div>

> [@shoulders](#):
>
> Within the UI make it possible to download the revisions, not just compare and replace with those on the server.

Why would you like to have it downloadable?

---

<div class="post-metadata">

**Author:** ![Stegan](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/stegan/32/6860_2.png) [@Stegan](https://forum.virtualmin.com/u/Stegan)\
**Post date:** [April 15, 2026, 1:38pm UTC](https://forum.virtualmin.com/t/restoring-emptied-etc-postfix-virtual-using-rebuild-map/136943/44 "2026-04-15T13:38:02Z")

</div>

as someone here who seems to be regressing down to basic, I find git and its continuing modifications a pain to the point of not caring and it has become as bad as mirosoft for bloat.

sometimes i wonder why not give up, if you are going to all the trouble of implementing within the gui then ok, but learning more git no way

---

<div class="post-metadata">

**Author:** ![shoulders](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/shoulders/32/10086_2.png) [@shoulders](https://forum.virtualmin.com/u/shoulders)\
**Post date:** [April 15, 2026, 1:52pm UTC](https://forum.virtualmin.com/t/restoring-emptied-etc-postfix-virtual-using-rebuild-map/136943/45 "2026-04-15T13:52:43Z")

</div>

Say I was having issues with my config, I would like to compare on my windows pc for safety. It is was I feel comfortable with.

However I don’t mind trying something new.

I only make changes on my live server when I have tried them on my demo server, especially config changes that I do not understand.

---

<div class="post-metadata">

**Author:** ![Joe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/joe/32/9_2.png) [@Joe](https://forum.virtualmin.com/u/Joe)\
**Post date:** [April 16, 2026, 5:24pm UTC](https://forum.virtualmin.com/t/restoring-emptied-etc-postfix-virtual-using-rebuild-map/136943/46 "2026-04-16T17:24:25Z")

</div>

> [@Stegan](#):
>
> but learning more git no way

That’s doing yourself a huge disservice. `git` is the single most important and useful technology in the world for software developers and sysadmins and devops folks, bar none. No other tool is more useful knowledge to have if you’re maintaining software or complicated systems.

If you really find the UX of git horrifying, there’s Jujitsu which I hear makes a git repo easier to work with. It is a new tool for working with a backing git repository. I haven’t tried it, but people who’s opinion I think highly of have recommended it.

> **[GitHub - jj-vcs/jj: A Git-compatible VCS that is both simple and...](https://github.com/jj-vcs/jj)**
>
> A Git-compatible VCS that is both simple and powerful

It, unfortunately, isn’t in any of the repos of OSes we support, AFAIK, so installation requires a Rust environment to build it with cargo.

And, I’m hesitant to suggest it, but I’ve found that the current generation of LLMs are quite comfortable using git…I’ve found they’re able to do even complex things pretty reliably. I made a tool to allow you to take a local AI agent with you onto a remote system you connect to via ssh: [GitHub - swelljoe/tandem: Take an agent buddy with you when you ssh · GitHub](https://github.com/swelljoe/tandem) (Currently only works with Claude Code, but is just a script wrapper for tmux with a CLAUDE.md that tells it about the environment and what it needs to do to interact with the remote system, and is easy to customize…you could easily modify it for Gemini CLI, Copilot CLI, or…shudder…Codex CLI). I made this for folks at my day job, where not everyone has Linux experience or CLI experience but sometimes needs to do something on our devices that are mostly only manageable via ssh.

But, comparing revisions in a repo is pretty simple stuff. Look at the log (`git log`) for the date you’re interested in, which looks like this:

```auto
root@debian13:/etc# git log
commit 8231449455dd71612fd7997958e64db27cb0e620 (HEAD -> master)
Author: root <root@debian13.virtualmin.com>
Date: Thu Apr 16 07:38:11 2026 -0500

    daily autocommit

commit 78fbe1fb336698c3e71a96abee92974ca4df9647
Author: root <root@debian13.virtualmin.com>
Date: Thu Apr 16 01:16:39 2026 -0500

    daily autocommit

commit 5017fa7eaf91a63698d9a2e060ea875187e38c4d
Author: root <root@debian13.virtualmin.com>
Date: Wed Apr 15 07:40:00 2026 -0500

    daily autocommit

commit e4b34c6e59217ae6d18915e76173397143a83bc2
Author: root <root@debian13.virtualmin.com>

```

And, then you can compare a revision versus the current repo:

```auto
root@debian13:/etc# git diff e169b7e1d596aa72d91765a31915a3295eaa10f3
diff --git a/webmin/virtual-server/config b/webmin/virtual-server/config
index 4562406..6f4901c 100755
--- a/webmin/virtual-server/config
+++ b/webmin/virtual-server/config
@@ -484,7 +484,7 @@ dkim_enabled=1
 external_ip_cache=66.69.239.61
 external_ip_cache_time=1774649987
 defaultdomain_name=none
-last_letsencrypt_mass_renewal=1776217802
+last_letsencrypt_mass_renewal=1776359402
 clamscan_host=
 clamscan_cmd_global=1
 no_lookup_domain_daemon=

```

Or, a specific file:

```auto
root@debian13:/etc# git diff e169b7e1d596aa72d91765a31915a3295eaa10f3 -- webmin/virtual-server/config

```

This happens to be the same output as the previous command, as that was the only change in that specific revision. Maybe that’s enough to show you what you changed that broke something.

Or, to restore the whole file to a previous revision, if you have a recent git version:

```auto
sudo git restore --source <commit-hash> -- <path/to/file>

```

Or, for older versions:

```auto
sudo git checkout <commit-hash> -- <path/to/file>

```

You can do this for any revision…you can go back and forth between the most recent commit and an older commit for testing with each, etc. The commit-hash represents the entire `/etc` directory at the point in time it was committed, so you can pick any file(s) to restore to an exact point in time. `etckeeper` auto-commits every day, and there are hooks to auto-commit on package updates and maybe some other events, I’m not sure of the details of when it runs (it’s in the category of already doing exactly what I want so I don’t modify the config)…but, it’s an incredibly powerful tool.

I do think `git` could be friendlier, but it’s worth learning for the power it provides. But, `jj` probably makes it easier, if you really can’t get along with `git`.

---

<div class="post-metadata">

**Author:** ![shoulders](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/shoulders/32/10086_2.png) [@shoulders](https://forum.virtualmin.com/u/shoulders)\
**Post date:** [April 16, 2026, 6:54pm UTC](https://forum.virtualmin.com/t/restoring-emptied-etc-postfix-virtual-using-rebuild-map/136943/47 "2026-04-16T18:54:12Z")

</div>

I use VSCode and all of the Git operations can be done by the GUI (well probably most).

Nebeans also handles Git in the GUI but it has been a while.

I have not gone hardcore yet and just used the terminal, but there is time yet.

Also I assumed if @ilia was doing a plugin, then it would have a GUI and some associated CLI.

---

<div class="post-metadata">

**Author:** ![jimr1](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jimr1/32/14173_2.png) [@jimr1](https://forum.virtualmin.com/u/jimr1)\
**Post date:** [April 16, 2026, 7:53pm UTC](https://forum.virtualmin.com/t/restoring-emptied-etc-postfix-virtual-using-rebuild-map/136943/48 "2026-04-16T19:53:36Z")

</div>

Just learn how to use git, saves someone’s time coding a wrapper for it. It’s really not that hard and there are plenty of guides on the internet on how to use each function of git, so a couple of hours and a bit of trail and error. Don’t confuse git with github as they are not the same animals

---

<div class="post-metadata">

**Author:** ![Ilia](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/ilia/32/10185_2.png) [@Ilia](https://forum.virtualmin.com/u/Ilia)\
**Post date:** [May 12, 2026, 10:06pm UTC](https://forum.virtualmin.com/t/restoring-emptied-etc-postfix-virtual-using-rebuild-map/136943/49 "2026-05-12T22:06:41Z")

</div>

> [@shoulders](#):
>
> Also I assumed if @ilia was doing a plugin, then it would have a GUI and some associated CLI.

That might be an interesting feature, though it would require quite a bit of work. Also, I’m not sure if it would be that useful for users.

---

<div class="post-metadata">

**Author:** ![system](https://cdn.forum.virtualmin.com/uploads/default/original/2X/c/cd96d761e326db4b2bef94886a639109bd7a8e76.svg) [@system](https://forum.virtualmin.com/u/system)\
**Post date:** [July 11, 2026, 10:07pm UTC](https://forum.virtualmin.com/t/restoring-emptied-etc-postfix-virtual-using-rebuild-map/136943/50 "2026-07-11T22:07:14Z")

</div>

Closed on July 11, 2026, 10:07pm UTC

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

[Previous page](https://forum.virtualmin.com/t/restoring-emptied-etc-postfix-virtual-using-rebuild-map/136943.md?page=2)
