determing what to backup

1. start a screen session (this will allow you to logoff and the backup will still be running on the system)

apt-get install screen; # if not instlled allready
screen -S backup; # start a new bash session called backup
# you can logoff by hitting Ctrl+A then D
# it will say: [detached from 2020.backup]

2. check what partitions / harddisks (sda = usually the whole system disk) to backup

lsblk; # check what partitions are there
df -h; # check what partition is using how much space

for files-only backup – rsync

# this would backup all files while keeping the ACL (access control list)
rsync -aAXv --update --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} /* /where/to/put/the/backup/

# this would backup all files of your system to a qnap NAS (does not support ACL)
rsync -aXv --update --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} /* /where/to/put/the/backup/

for bootable system backups (including boot sector mbr, etc) – dd

if the harddisk is very big (with empty space) you can gzip compress it to save storage space on your backup medium.
problem: all backups are “full-take” – it can not do incremental backup.

3. start the backup: filename: backupSystem.sh

backupThisPartition=/dev/sda; # what to backup
backupTo=/mnt/DATA/BACKUP/GIADA/JESSIE/$(date +%Y-%m-%d)_SystemBackup_of_GIADA.gz; # where to put the backup
dd if=$backupThisPartition bs=1024 conv=noerror,sync | pv | gzip -c -9 > $backupTo; # do the backup

4. you should see a progress bar

backup system with dd

5. hit Ctrg/Strg+A+D to detach from screen-session and let backup run in background.

6. restore should work like this (untested)

backupTo=/mnt/DATA/BACKUP/GIADA/JESSIE/$(date +%Y-%m-%d)_SystemBackup_of_GIADA.gz; # where to put the backup
gunzip -c $backupTo | pv | dd of=/dev/sda bs=1024

what backup systems are there

fwbackup is said to be a pretty good tool:

http://www.diffingo.com/oss/fwbackups

apt-cache search backup|grep system
backintime-common - simple backup/snapshot system
backupninja - lightweight, extensible meta-backup system
backuppc - high-performance, enterprise-grade system for backing up PCs
bootcd - run your system from cd without need for disks
boxbackup-client - client for the BoxBackup remote backup system
boxbackup-server - server for the BoxBackup remote backup system
bup - highly efficient file backup system based on git
bup-doc - highly efficient file backup system based on git (documentation)
chiark-backup - backup system for small systems and networks
chiark-scripts - chiark system administration scripts
cinder-backup - OpenStack block storage system - Backup server
debian-handbook - reference book for Debian users and system administrators
dirvish - Filesystem based backup system using rsync
dump - 4.4bsd dump and restore for ext2 filesystems
duply - easy to use frontend to the duplicity backup system
fatcat - FAT filesystem explore, extract, repair, and forensic tool
fstransform - Tool for in-place filesystem conversion
fsvs - Full system versioning with metadata support
hdup - Filesystem duplicator and backup
incron - cron-like daemon which handles filesystem events
libguestfs0 - guest disk image management system - shared library
metastore - Store and restore metadata from a filesystem
nagios-plugins-contrib - Plugins for nagios compatible monitoring systems
netscript-ipfilter - Linux 2.6/3.x iptables management system.
nilfs-tools - Continuous Snapshotting Log-structured Filesystem
nilfs-tools-dbg - Continuous Snapshotting Log-structured Filesystem (debug)
nocache - bypass/minimize file system caching for a program
libafsauthent1 - AFS distributed file system runtime library (authentication)
libafsrpc1 - AFS distributed file system runtime library (RPC layer)
libkopenafs1 - AFS distributed file system runtime library (PAGs)
libopenafs-dev - AFS distributed filesystem development libraries
libpam-openafs-kaserver - AFS distributed filesystem kaserver PAM module
...
qwbfsmanager - graphical file manager for the WBFS filesystem
rdiff-backup-fs - Fuse filesystem for accessing rdiff-backup archives
rsnapshot - local and remote filesystem snapshot utility
rsyslog - reliable system and kernel logging daemon
s3ql - Full-featured file system for online data storage
s3ql-dbg - Full-featured file system for online data storage (debugging symbols)
slbackup - Skolelinux Backup system
xfsdump - Administrative utilities for the XFS filesystem
fssync - File system synchronization tool (1-way, over SSH)

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin