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
Bookmarks