Skip to content

Instantly share code, notes, and snippets.

@prologic
Created November 13, 2014 07:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prologic/b59986e43f4ab592b012 to your computer and use it in GitHub Desktop.
Save prologic/b59986e43f4ab592b012 to your computer and use it in GitHub Desktop.
created by github.com/tr3buchet/gister
#!/bin/bash
rsync \
-a -v -z -H -X \
--one-file-system \
--numeric-ids \
--exclude=/tmp
--exclude=/sys
--exclude=/dev
--exclude=/boot
--exclude=/data
--exclude=/proc
--exclude=/mnt
--exclude/etc/mtab
--exclude=/lib/modules*
-e ssh root@10.0.0.2:/ /
# Truncate log files
find /var/log -type f -exec truncate --size=0 {} +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment