It's all in the title. Is there a way to regenerate my /etc/rc.conf file? The FreeBSD box is still running, I just can reboot it anymore 

hostname="bsdserver.bsd" [B]Change it to yours as zeiz said[/B]
ifconfig_re0="192.168.1.4 netmask 255.255.255.0" [B]re0 is my module because i have realtek chipset. Change re0 to yours[/B]
ipv6_enable="YES"
font8x8="NO" [B]if yes that change the font on console[/B]
defaultrouter="192.168.1.1" [B]Change it to your routers ip[/B]
moused_enable="YES"
hald_enable="YES"
linux_enable="YES" [B]if you choosed linux compatibility say yes. Otherwise say no here[/B]
dbus_enable="YES"
keymap="..."
hostname="..."
defaultrouter="..."
ifconfig_if0="..."
...
sshd_enable="YES"
You can make 1-hours backup (forever) in not much more than 300KB with zpaq/zpaqfranzSee what [cmd=""]ifconfig[/cmd] says to get an idea about your network settings, use top(1) in verbose mode or try lots of ps(1) flags to poke around ([red]-aux[/red] is pretty comprehensive) and see what daemons are running. I have a few optional daemons like nfsd, sshd, ntpd, mountd, & powerd here, yours may vary.
Good luck. Once every few days I create a bzipped tar of /etc/, so I don't have to worry about accidental deletions like that. It takes up all of about 300k (/usr/local/bin/7z gets it down to 258k, which is hardly worth the hassle). Just backing up the user-modified files is left as an exercise for the reader.
Yes - here it is - https://vermaden.wordpress.com/2021/02/23/upgrade-freebsd-with-zfs-boot-environments/Before an upgrade of a running system, create a boot environment to preserve the current working one and then do the upgrade. I tend to upgrade into the "default" BE. Others will create a new BE, chroot into it and then upgrade (I think vermaden has a page showing this).
There is a BSD port with a lot of other things, zpaqfranz, my fork.@fcorbelli
First time I hear of this tool "zpaq", it looks like interesting.
I checked its git repo but the last commit was in 2016 would you say that it is not maintained anymore ?
![]()
GitHub - zpaq/zpaq: ZPAQ's complete code history mirror
ZPAQ's complete code history mirror. Contribute to zpaq/zpaq development by creating an account on GitHub.github.com
mkdir /tmp/testme
cd /tmp/testme
wget http://www.francocorbelli.it/zpaqfranz/ports-51.10.tar.gz
tar -xvf ports-51.10.tar.gz
make install clean
That is a reasonable thought, but I think the OP basically has/had a running system and deleted rc.conf so no backups, no save of local modifications.Instead of any tool, GIT or trying to find out the deleted values I would recommend to use a simple backup.
indeed it looks like it.In a nutshell: it's like a sort of 7z or rar with snapshots
ee
. hostname="bakemono"
ifconfig_em0="DHCP"
ntpd_enable="YES"
ntpd_sync_on_start="YES"
powerd_enable="YES"
powerd_flags="-a hiadaptive -b adaptive"
dumpdev="NO"
sendmail_enable="NO"
syslogd_flags="-c -ss"
microcode_update_enable="YES"
hald_enable="YES"
dbus_enable="YES"
linux_enable="YES"
avahi_daemon_enable="YES"
fsck_enable="YES"
swapexd_enable="YES"
clean_tmp_X="YES"
clear_tmp_enable="YES"
devd_enable="YES"
devfs_system_ruleset="devfsrules_common"
tcp_drop_synfin="YES"
pf_enable="YES"
pf_rules="/etc/pf.conf"
pf_flags=""
pflog_enable="YES"
pflog_logfile="/var/log/pflog"
pflog_flags=""
ssh_enable="NO"
You are right. I decide to reinstall FreeBSD 13 from scratch on my personal laptop and this happened before I made the first backup. I have a backup of the previous install but without last changes (trying to enable 2 screen on this laptop !). I lost nothing with this bad experience...Instead of any tool, GIT or trying to find out the deleted values I would recommend to use a simple backup.