On 8/24/22 13:28, Shadrock Uhuru wrote:
hi everyone
after losing a considerable amount of data that i had accumulated over the last
year or so
by trying to remove a directory called '~' that i had created by mistake
in a sub directory of my home directory with rm -rf ~
which of course started to eat through my home directory with a vengence,
i managed to stop it before it went to far,
i didn't have any recent backups,
needless to say i've learning my lesson about having a good policy of regular
backups.
what are the recommended partition to backup if
1 i want to do a fresh reinstall e.g. to move to a larger hard drive.
2 for a disaster recovery like what i experienced above.
i will be using ville walveranta's autodump 1.5a script
which does a full dump on sundays and incremental dumps during the week,
i already have /home /etc and /root set for backup,
are there any other partitions i should bear in mind ?
shadrock
/root and /etc should be on the root partition ( / , sd0a, typically).
There is *generally* not much data of substance in the directory /root,
but that depends on your environment.
Also depending on your environment, there's often a lot of really important
stuff in /var. Or not. You may have local scripts hiding out in
/usr/local/*bin.
If you want a "Bare Metal" restoration, you really need everything. I
kinda think of 'dump' as a bare-metal restoration tool, though it can
definitely restore individual files.
The real answer, though, is "you backup everything you need". OpenBSD
installs are so small, the vast majority of your system is often so much
bigger, might as well just back up everything, or exclude things that are
more trouble than they are worth (/mnt, /tmp leap into mind).
After you establish your backup system, build and validate a new system
based on that backup, both a "fresh install" and a "unhappy event" case.
I'm rather a fan of "know where your important files are" and restore by
building a new system, installing the required applications, then copying
over the config files and the data directories. Thus I tend to be partial
to rsync backups using the --link-dest option rather than dump(8)s of file
systems. Both have their place, and they really aren't competitors.
I have a sample starting point rsync --link-dest script here:
https://holland-consulting.net/scripts/ibs/
Nick.