gedankensplitter/backupNAS.md

61 lines
2.0 KiB
Markdown
Raw Normal View History

2022-02-01 20:34:39 +00:00
---
keywords:
- IT
---
2022-03-27 18:17:44 +00:00
## Backup odroid NAS
2022-02-01 20:34:39 +00:00
```
/dev/mmcblk0
http://www.fsarchiver.org/Main_Page
Full Backup, wöchentlich
dd if=/dev/mmcblk0 bs=1M |pv | dd of=$backupDir/backup.img
MBR/EBR backup
sudo apt-get install sfdisk
$ sudo sfdisk -d /dev/mmcblk0 > $backupDir/partition_table.txt
sudo sfdisk /dev/mmcblk0 < $backupDir/partition_table.txt
#backup bootloader
#get first partition sector
sudo sfdisk -l /dev/mmcblk0
#backup bootloader
sudo dd if=/dev/mmcblk0 of=$backupDir/bootloader.bin bs=512 count=$BeginSektor
#restore bootloader
sudo dd if=$backupDir/bootloader.bin of=/dev/mmcblk0 bs=512 skip=1 seek=1
#Bootstrap restore
sudo dd if=$backupDir/bootloader.bin of=/dev/mmcblk0 bs=446 count=1
#backup ext4 partition while mounted
$ sudo fsarchiver -o -v -A -j 4 savefs $backupDir/partition_2.fsa /dev/mmcblk0p1
```
/etc
-inkrementelles Backup
-merge Backups (welche Kriterien)
-verschlüsselt (ssl keys)
http://dar.linux.free.fr/doc/mini-howto/dar-differential-backup-mini-howto.en.html#the-backup-strategy
dar -c /mnt/backup/etc_initial --compression=lzo -s 50M -M -R /etc --hash sha1 --user-comment "%d: %c" -Z "*.gz" -Z "*.bz2" -Z "*.zip" -Z "*.png"
dar -C /mnt/backup/etc_`date -I`.cat /mnt/backup/etc_initial --user-comment "%d: %c"
dar -c /mnt/backup/etc_initial --compression=lzo -s 50M -M -R /etc --hash sha1 --user-comment "%d: %c" -Z "*.gz" -Z "*.bz2" -Z "*.zip" -Z "*.png" -A /mnt/backup/etc_initial
/var/*
-incrementelles Backup
-merge Backups (welche Kriterien)
-verschlüsselt (ssl keys)
/home/*
-syncthing
--Fullbackup
--täglich Datenbank und config sichern
-verschlüsselt (ssl keys)
/root
--Fullbackup
-verschlüsselt (ssl keys)
Nextcloud
--täglich Datenbank Dump und cloud_data
-verschlüsselt
2022-06-09 19:50:05 +00:00
## duplicati backend
### client
the data source aka client holds a local database to be fast. this db does not get copied to the remote target. the remote target only contains `dlist.zip.aes`, `dindex.zip.aes` and `dblock.zip.aes` files.
`duplicati-cli repair {filepath}`