Backing up a whole system over network date: 2014-08-26 17:09:14+00:00 categories: - Linux tags: - shell
On the system being backed up:
tar cvpf - --directory=/ --exclude=proc --exclude=sys --exclude=dev/pts . | netcat 192.168.1.82 1234
On the system where you're sending to:
netcat -l -p 1234 | gzip > backup-2014-08-26.tar.gz
I'm using this to backup my phone right now, although it's a bit messier than I intended because I've got the Debian image mounted, so I'm pulling a backup of all its directories, too. (sigh) Well I can pull those out later. Next time I do this I'll see if tar has an option to not traverse mounts, or failing that just add more exclude lines to ignore Debian's directories.