Posted By

lfatr on 09/29/10


Tagged

backup ubuntu


Versions (?)

Backup ubuntu


 / Published in: Bash
 

URL: http://ubuntuforums.org/showthread.php?t=35087

  1. # Use this in the root folder to compress your server into a tgz
  2. tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys
  3.  
  4. # Add more excludes depending of your server...
  5. tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys --exclude=/old --exclude=/aquota.user --exclude=/aquota.group /
  6.  
  7.  
  8. backup.sh
  9. #!/bin/bash
  10. today=$(date '+%d_%m_%y')
  11. tar cvpzf /var/backups/backup_"$today".tgz --exclude=/proc --exclude=/lost+found --exclude=/var/backups --exclude=/backup.tgz --exclude=/mnt --exclude=/sys --exclude=/old --exclude=/aquota.user --exclude=/aquota.group /

Report this snippet  

You need to login to post a comment.