SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 31 of 31
  1. #26
    SitePoint Member
    Join Date
    Dec 2008
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you need I can post some generic scripts I made years ago and using up to now on more then 100 servers.

  2. #27
    SitePoint Zealot superjacent's Avatar
    Join Date
    Jun 2007
    Location
    Melbourne, Australia.
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by skinstc View Post
    If you need I can post some generic scripts I made years ago and using up to now on more then 100 servers.
    I was just about to create a thread about this, so yes, would appreciate a generic script.

  3. #28
    Non-Member
    Join Date
    Oct 2008
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wordpress is must better & secure then blogger, as i think.

  4. #29
    SitePoint Member
    Join Date
    Dec 2008
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First you need to configure no password access by ssh for user backuper on remote machine where backupes will be stored (key authorization)

    cat backup.sh

    #!/bin/bash
    date +'%H:%M %d-%m-%y'
    conf=/opt/scripts/backup/backup.conf # path to datadir config file
    tmpdir=/tmp/backup
    tarfile=/tmp/$HOSTNAME\_$(date +'%d-%m-%y').tar
    rm -rf $tarfile*
    rm -rf $tmpdir
    mkdir $tmpdir
    mkdir $tmpdir/mysql
    mysqldump cacti > $tmpdir/mysql/cacti.sql
    mysqldump mysql > $tmpdir/mysql/mysql.sql
    for i in $( /bin/cat $conf ); do
    cp -R --parents $i $tmpdir
    done
    tar -cf $tarfile $tmpdir > /dev/null 2>&1
    gzip $tarfile
    rm -rf $tmpdir
    scp $tarfile.gz backuper@aaa:/srv/backup/archive/ # this is remote server path to keep archives
    rm -rf $tarfile
    rm -rf $tarfile.gz





    cat backup.conf

    /etc/
    /root/
    /opt/
    /var/

    data directories to be backuped


    finaly prepare cronjobs to run backup.sh
    example:
    cat /etc/cron.d/backup

    00 05 * * * root /opt/scripts/backup/backup >> /var/log/backup.log 2>&1


    If there are any questions don't hesitate to ask me

  5. #30
    SitePoint Zealot superjacent's Avatar
    Join Date
    Jun 2007
    Location
    Melbourne, Australia.
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by skinstc View Post

    snip...

    If there are any questions don't hesitate to ask me
    Thanks, I'll play with that over the weekend.......

  6. #31
    SitePoint Member
    Join Date
    Dec 2008
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Over weekend I will be online from time to time - so welcome with questions if such


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •