Re: recommended partitions to backup with dump

2022-08-27 Thread Edward Ahlsen-Girard
On Thu, 25 Aug 2022 07:59:00 - (UTC)
Stuart Henderson  wrote:


> /var, maybe exclude /var/cache. (maybe also /var/log, but it can be
> useful to have).
> 
Is there a way to exclude directories within a selected volume for a
full backup? It looks as though nodump only works for levels above 0.


-- 

Edward Ahlsen-Girard
Ft Walton Beach, FL




Re: recommended partitions to backup with dump

2022-08-25 Thread Stuart Henderson
On 2022-08-24, 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,

As you probably now figured out, use quotes: '~'

"rm -rf -i $whatever" if you have any suspicion that the name might be
"difficult".

(-i must come *after* -f, so there's little point aliasing rm to rm -i).

> 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,

That's a far more complicated script tgan I woukd consider using for
backups. Do you understand what it does and how it works?

A backup done to the same machine is not really a backup.

> i already have /home /etc and /root set for backup,
> are there any other partitions i should bear in mind ?

/var, maybe exclude /var/cache. (maybe also /var/log, but it can be
useful to have).

-- 
Please keep replies on the mailing list.



Re: recommended partitions to backup with dump

2022-08-25 Thread Andrew Grillet
Remember that some that some things need to be explicitly dumped -
eg databases and repositories
because when you do restore, you might want to restore to an upgraded OS
version.

Rather than use dump, I use gtar - I have restored stuff after 30 years
with gtar,
to completely different OSes - eg OS/2 to OBSD! *
If you do GFS (four tapes: grandfather, father, son, and NEXT), each tape
is approximately
used once per month, and can be expected to have quite a long life. The
"Son" tape
is kept near the drive, the "father" tape goes off-site.

You tape from the disk backup (done with rsync) machine - databases and
repositories can
have hot standbys on the same machine.

In case of disaster recovery, step 1 is to duplicate the "father" tape off
site. Then you still
have a chance of knowing how bad things are before you accidentally
overwrite the "son".
Once a year, you can put one father tape aside for archive, and replace
with a fresh tape.
Possibly twice a year - to maintain a second, completely separate, archive.

If you don't use tapes, expect to lose data one day.

I am probably the only person to have restored data from VMS to BBC Micro
using 1600BPI reel to reel tapes.
(Probably the only person to have a BBC micro with both reel-to-reel tape
and ST506 interfaces).

Andrew

* ICL George 2 to VMS only worked with no compression, and George 2 to Cray
:-) required
an assembler program to convert between the two different the 6-bit ASCII
character sets
on 7-track 556 bpi tapes.


Re: recommended partitions to backup with dump

2022-08-24 Thread Geoff Steckel




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


I agree with "know exactly what you need" or "save everything"
If backups are cheap in time and money just save everything
as often as you can - daily if you do a lot online.
Rebuilding from incremental dumps can be painful.

Even if dumping everything I'd consider leaving out any directory
with "cache" in its name
That can potentially save many gigs of storage and hours of backup time.
Thunderbird and firefox usually have multiple gig databases.

If backups are expensive and you're being very, very selective, I'd add
to your list:

the output of pkg_info
/usr/local, /var/mail
potentially /usr/src, /var/www, /var/unbound, /var/nsd
any directories I added or I'm not sure about
any system directories where I've modified files

Any volumes not part of the base system have their own dump schedule.
hth
Geoff Steckel



Re: recommended partitions to backup with dump

2022-08-24 Thread Nick Holland

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.



Re: recommended partitions to backup with dump

2022-08-24 Thread Gökşin Akdeniz

Hello Shadrock

24.08.2022 20:28 tarihinde Shadrock Uhuru yazdı:



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.



These arguments will require a "full backup". It means backup all 
partitions, so you can migrate all data (which means both os and personal)


So you can restore it all ("as they were"). Incrementel backups require 
level 0 back up and restore process will require all incremental 
backsups in sequential so restoring process will recover everything 
properly.


My humble advice is running a full backup of all partitions regularly 
(aka bare metal backup). Time intervals depends on activities and policy.


Sincerely yours,


OpenPGP_0x648AAD2AAA3BAD5F_and_old_rev.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: recommended partitions to backup with dump

2022-08-24 Thread Luke A. Call
On 2022-08-24 12:51:16-0500, Allan Streib  wrote:
> On Wed, Aug 24, 2022, at 12:28, Shadrock Uhuru wrote:
> > i already have /home /etc and /root set for backup,
> > are there any other partitions i should bear in mind ?
> 
> I always backup /var

The above make sense to me also.
Exploring  man 7 hier  might also be interesting, and possibly seeing
what is on a newly installed system, and what is not.



Re: recommended partitions to backup with dump

2022-08-24 Thread Allan Streib
On Wed, Aug 24, 2022, at 12:28, Shadrock Uhuru wrote:

> i already have /home /etc and /root set for backup,
> are there any other partitions i should bear in mind ?

I always backup /var

Allan



recommended partitions to backup with dump

2022-08-24 Thread Shadrock Uhuru

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