Backups

From regional-training
Revision as of 10:28, 10 August 2022 by Ralph (talk | contribs) (→‎categories)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is only beneficial on machines such as:

  • Windows
  • embedded
  • Linux that is not using LVM.

The advantages are its a verbatim copy of the machine, but the disadvantages are it is slow and archives can take up more room, unless compressed (which is why I have used lz4). Follow the backup instructions in Backup and Restore for LVM systems that use Volume Groups and Logical Volumes.

Here are the basic disk imaging instructions.

  • image backups (dd is in coreutils which will be automatically loaded)
sudo dc3dd if=/home/volumes/repos.v | lz4 > /mnt/sc1/backups/server.arising.com.a/repos.20191127.lz4
  • or you can use dd if you do not want to install dc3dd
dd if=/dev/sdx bs=10M status=progress| lz4 > sdx.lz4
  • restore
lz4 -d sdx.lz4 | pv [-s <nG>] | dd bs=1M of=/dev/sdx 
lz4 -d sdx.lz4 | dd bs=1M of=/dev/sdx status=progress
Don't forget the bs=<buffer> size if you use dd else you will be waiting a while for it to read and write to the target volume, dc3dd is able to default to a more reasonable buffer size if you use dc3dd instead.
  • source backups
rsync -avxHAXW --inplace /mnt/repos $name
  • useful stuff
iostat 60
locate (updatedb)
iostat
  • Debian and Kali package names
apt install dc3dd lz4 sysstat mlocate rsync sysstats

categories