Cleaning-up a system for migration and destruction

find / -type f -size +1G

system common

backup/migrate, for every user incl. root

~/.ssh/
~/bin/
crontab

and system-wide

cd /etc/
ls -altr

/etc/hosts
/etc/resolv.conf

/opt/
/data/

workstation specific

~/.config/chromium/
~/.mozilla/
~/.thunderbird/
desktop documents pictures ...

send to DEDIBACKUP

public data

#xc
lftp -u auto,auto dedibackup-dc2.online.net
lcd /data/backup/
mirror -R -e -c

sensible data

#xc
lftp -u auto,auto dedibackup-dc2.online.net
lcd /data/
secret=SYMMETRIC-PASSPHRASE-HERE
tar czf - TARGET/ | \
    openssl enc -aes-256-cbc -e -k "$secret" -pbkdf2 -out TARGET.tar.gz.aes \
    && echo done || echo FAILED

DEDIBOX wipe-out

in case you are liberating that root-server from your farm, wipe-out your backups first

#ssd
lftp -u auto,auto dedibackup-dc3.online.net

then boot in rescue mode and

fdisk -l

mount /dev/sda1 /mnt/
apt update
apt install secure-delete
srm -rf /mnt/root/.ssh/
srm -rf /mnt/home/USERNAME/.ssh/
umount /mnt/

dd if=/dev/zero of=/dev/sda status=progress
sync

reboot in normal mode and get rid of the box


HOME | GUIDES | BENCHMARKS | html