Making a full backup of data...

Discussion in 'Installation/Configuration' started by nvn, Dec 22, 2007.

  1. nvn

    nvn New Member

    Hi

    I'm making a full data backup every day...
    But I'm a little unsure if I'm missing some vital files.

    This is my script to copy and compress files:

    Code:
    
    #!/bin/sh
    Today="`date +%d%m%Y`"
    #mkdir /backup/backup-files/$Today
    rm /backup/backup-files/*.*
    rm /backup/total_webserver*.*
    mysqldump -h localhost -u root -p****** -c --add-drop-table --add-locks --all-databases --quick --lock-tables > /backup/backup-files/sql_all-`date '+%d-%b-%Y'`.sql
    cp /etc/passwd /backup/backup-files
    cp /etc/postfix/main.cf /backup/backup-files
    cp /etc/shadow /backup/backup-files
    cp /etc/group /backup/backup-files
    cp /etc/apache2/vhosts/Vhosts_ispconfig.conf /backup/backup-files
    cp /etc/postfix/local-host-names /backup/backup-files
    cp /etc/postfix/virtusertable /backup/backup-files
    cp /etc/named.conf /backup/backup-files
    cp /etc/proftpd*.conf /backup/backup-files
    tar -zcpf /backup/backup-files/www_`date '+%d-%b-%Y'`.tar.gz /srv/www
    tar -zcpf /backup/total_webserver_`date '+%d-%b-%Y'`.tar.gz /backup/backup-files
    cp /backup/total_webserver_`date '+%d-%b-%Y'`.tar.gz /remotebackup
    
    ¨

    Thanks for any suggeston you might have...

    NVN
     
  2. falko

    falko Super Moderator Howtoforge Staff

    It depends on what services you are running and what you want to back up...
    Which distribution are you using? Do you use ISPConfig?
     
  3. ebal

    ebal New Member

    I suggest to use http://www.rsnapshot.org/
    to all your etc & data directories.

    But as falko have already send you should see what services your system is running and where the confs & data are.
     
  4. nvn

    nvn New Member

    I'm using SUSE 10
    I'm hosting a few webpages and email.
    Using ISPConfig as main system to control the webserver.
    It is a standard HowTo installation.

    I will be looking at Rsnapshot after christmas. Look like a nice alternative to my manual backup. :)
     
  5. falko

    falko Super Moderator Howtoforge Staff

Share This Page