You could do something like this for your daily script.
Code:
#!/bin/bash
# finds all files that have been added or modified in the last 24 hours and puts
# them in a file named /tmp/filelist.daily
find / -mtime -1 \! -type d -print > /tmp/filelist.daily
# puts the start date and time in a file named date.daily in the tmp directory.
date > /tmp/date.daily
# start portmap service
/etc/rc.d/rc.portmap start
# mounts the network share lazarus on the server named srv3.
mount busrv:/pub/backups /mnt/busrv
# changes the current working directory to root
cd /
# make a tar file with all the files listed in the filelist.daily file
# puts the finish time and date in a file named date.daily in the tmp directory
date >> /tmp/date.daily
# unmounts the the network share on srv3
umount /mnt/busrv
# stop portmap service
/etc/rc.d/rc.pormap stop
And something like this for your weekly backup.
Code:
#!/bin/bash
# Change working directory to / (root).
cd /
# Set the date
echo "set date variable"
DATE=`date +'%m-%d-%Y'`
# Log start time to /var/log/backup.log.
echo "start backup"${DATE} >> /var/log/backup.log
# Starts the rpc.portmap service used to mount a remote nfs share.
echo "start portmap service"
/etc/rc.d/rc.portmap start
# Mount the remote share named backups on the server named srv3.
echo "mount shared network drive"
mount busrv:/pub/backups /mnt/busrv
# Create a tarball of all files listed in the [todays date]_files file.
echo "creat tarball"
tar cvfz /mnt/busrv/srv1_scripts-${DATE}.tar.gz bin sbin
tar cvfz /mnt/busrv/srv1_boot-${DATE}.tar.gz boot
tar cvfz /mnt/busrv/srv1_etc-${DATE}.tar.gz etc
tar cvfz /mnt/busrv/srv1_home-${DATE}.tar.gz home
tar cvfz /mnt/busrv/srv1_usr-${DATE}.tar.gz usr
tar cvfz /mnt/busrv/srv1_var-${DATE}.tar.gz var
tar cvfz /mnt/busrv/srv1_lib-${DATE}.tar.gz lib
tar cvfz /mnt/busrv/srv1_root-${DATE}.tar.gz root
# Umount remote share.
echo "unmount network drive"
umount /mnt/busrv
# Stop rpc.potmap service.
echo "stop portmap service"
/etc/rc.d/rc.portmap stop
# Change working directory back to /root.
cd