Advertisement
| 11.19.2008 at 09:12AM PST, ID: 23918585 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: |
#!/bin/sh #VARIABLES DAYOFWEEK=`date +%a` BACKUPDEVICE=/dev/sdc1 #FAT32 USB drive BACKUPMOUNTPOINT=/mnt/usbdrive BACKUPFOLDER=$BACKUPMOUNTPOINT/backup/$DAYOFWEEK BACKUPLOG=/home/$DAYOFWEEK-backup.log #SUMMARY-BACKUPLOG # Checks # Is device available for mounting? If not write to $BACKUPLOG # Is backup disk device already mounted? # Mount the USB disk . #mount [-fnrsvw] [-o options [,...]] device | dir mount -o shortname=winnt $BACKUPDEVICE $BACKUPMOUNTPOINT #Ensure backup folder exists mkdir -p $BACKUPFOLDER # Backup data # /home, /etc ,/var and /root to the FAT32 external USB drive. # rsync # -v verbose output # -r recurse into directories # -l copy symlinks as symlinks # -t preserve times # --delete delete destination files that don't exist at source # --modify-window=1 for fat32 compatibility # no -og options to avoid chown errors echo "### Backup- /home/data ###" >> $BACKUPLOG rsync -vrlt --stats --delete --modify-window=1 /home/data $BACKUPFOLDER > $BACKUPLOG #tail to summary backup log echo "### End /home/data ###" >> $BACKUPLOG echo "" >> $BACKUPLOG cp /home/$DAYOFWEEK-backup.log $BACKUPMOUNTPOINT/ # Unmount the backup disk. umount $BACKUPDEVICE |
Advertisement