Skip to content

Instantly share code, notes, and snippets.

@juniovitorino
Created November 20, 2014 20:50
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 juniovitorino/59f57394609b5d44249a to your computer and use it in GitHub Desktop.
Save juniovitorino/59f57394609b5d44249a to your computer and use it in GitHub Desktop.
CLONE CLIENTES PARTITION AND SAVE COMPRESSED IMAGE IN AN EXTERNAL HARD DISK (USB)
#!/bin/bash
# AUTHOR: JUNIO VITORINO | jgvitorino@gmail.com
# DESCRIPTION: DAILY CLONE CLIENTES PARTITION AND SAVE COMPRESSED IMAGE IN AN EXTERNAL HARD DISK (USB)
# DATE: NOVEMBER 20, 2014
rm -rf /backup/*.gz
now=$(date +"%m_%d_%Y")
dd if=/dev/sda5 conv=sync,noerror bs=1K | gzip -c > "/backup/dd_image_clientes_$now.gz"
* 0 * * * /bin/sh /home/manager/backup.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment