Results 1 to 4 of 4

Thread: Backup on internal HDD with rsync

  1. #1
    Join Date
    Mar 2010
    Posts
    38

    Backup on internal HDD with rsync

    I have at home a SME 7.5.1 server only for our email, contacts, calendar etc... which has no regular backup, automated incremental. Having recovered a large IDE HDD and as we approached a long rainy weekend, I'm starting.

    Backup seems complicated and the net offer lots of solutions that tells me to do the following:

    Creating directory to store the backup
    mkdir /backup

    Adding a hard disk

    # List partitions
    fdisk-l

    # Create and format the partition for backups with
    fdisk /dev/hdb

    # Automate mounting
    vi /etc/fstab

    # By adding the following line:

    /dev/hdb1 /backup ext3 usrquota,grpquota 1 1

    # Mount the partition
    mount /dev/hdb1

    # Recreate the quotas
    quotacheck -cguv /backup

    # Create the backup script
    vi /bin/backup.sh
    # Copy the following lines:

    #!/bin/sh
    # Date variable
    DATE=$(date +%d)
    echo "$DATE" >>/tmp/backup.txt
    # Rsync large file server
    SRC1 = ("/home/e-smith/files" "")
    # Destination on the backup server
    DEST="/backup/"
    # -n simulation
    OPTIONS=" --fo^rce --ignore-errors --delete --delete-excluded -av"
    # Rsync command
    rsync $OPTIONS ${SRC1[@]} $DEST >>/tmp/backup.txt

    # Change the script rights
    chmod u+x /bin/backup.sh

    # Create a ibay "backup" in the server manager (each can fetch a file deleted by mistake)

    # Create a symbolic link between data backup and the backup ibay
    ln -s /backup/* /home/e-smith/files/ibays/backup/

    # Automate start backup
    vi /etc/cron.d/backup
    # Copy the following lines

    # Run the backup script every day at 2:55
    55 2 * * * root /bin/backup.sh

  2. #2
    Join Date
    Apr 2008
    Posts
    3,339

    Re: Backup on internal HDD with rsync

    Rsync is a very good solution, and I understand that some prefer it. While respecting this choice, I remind those who seek an automated backup solution that is simple and effective, using just rsync, but is much simpler to implement. I think it would be more effective than a mere copy/paste that people usually does using a script.

  3. #3
    Join Date
    Jan 2006
    Posts
    3,792

    Re: Backup on internal HDD with rsync

    I would recommend to go for Affa package. This package makes a SME 7 Server into a dedicated backup box in a few minutes. Affa backs up as many SME servers as you want provided it has sshd running and rsync installed. Once configured, Affa runs reliably unattended and sends warning messages in case of any errors. Affa is based on the rsync program and supports the rsync --compress option. Affa is a command line tool for system administrators and is intentionally designed without a GUI.

  4. #4
    Join Date
    Mar 2010
    Posts
    38

    Re: Backup on internal HDD with rsync

    For Affa, I'll read the doc because I thought of reserved for "cloning" a server. Here is what I have understand until now.

    1. For installation:
    wget http://mirror.contribs.org/smeserver...rc4.noarch.rpm
    wget http://mirror.contribs.org/smeserver...l4.rf.i386.rpm
    /usr/bin/yum --enablerepo=smecontribs localinstall \
    smeserver-affa-2.0.0-rc4.noarch.rpm \
    perl-Compress-Bzip2-2.09-1.2.el4.rf.i386.rpm

    After the first installation of Affa, run the following command to initialize the database.
    affa --make-cronjobs

    and disconnect and reconnect to the console for the automatic completion of bash (TAB) to take effect

    2. For installation from USB disk :

    Alternative : configuration of hard disk
    * We create a Linux partition using fdisk
    fdisk /dev/sdb

    * You format the drive with an ext3 filesystem :
    mkfs.ext3 /dev/sdb1

    * Create the mount point:
    mkdir -p /mnt/affadevice

    * Write your disk SD /etc/fstab file. It therefore creates a new line:
    /dev/sdb1 /mnt/affadevice ext3 defaults

    * It mounts the disk:
    mount /mnt/affadevice

    * There is a cross-check with df:
    df

Similar Threads

  1. Replies: 4
    Last Post: 03-01-2014, 02:29 PM
  2. Replies: 4
    Last Post: 13-12-2010, 10:16 AM
  3. Enhanced rsync backup, daemon support
    By Galimberti in forum Software Development
    Replies: 4
    Last Post: 17-06-2010, 11:19 PM
  4. Use rsync for backups
    By Jensen Ackles in forum Operating Systems
    Replies: 5
    Last Post: 22-03-2010, 11:40 AM
  5. rsync problem
    By Jagdish Gada in forum Operating Systems
    Replies: 3
    Last Post: 19-02-2009, 08:37 AM

Tags for this Thread

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
  •  
Page generated in 1,713,580,433.45907 seconds with 17 queries