Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A free psync backup script' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A free psync backup script
Authored by: httpd on May 07, '04 05:18:21PM

Since I use psync to backup my files to a Windows share I wrote this script so I could put in /etc/crontab. I use psync-0.65.16 since it is better with Samba shares the the original 0.65 version.
You can get it at http://www.jacek-dom.net/software/psync/
(And yes, you should really hide your username and password to the windows share better and not put in the url, but that is explained all over the place)


Backup.sh
----
#/bin/sh
echo "Starting with making a folder"
mkdir /Volumes/mybackupfolder
echo "mounting network drive"
mount_smbf //myusername:mypassword@ip_to_my_host/shared_directory /Volumes/mybackupfolder
echo "Stage one is complete"
echo "lets backup somee files"
psync -r -p /Users/myusername/folder_to_backup /Volumes/mybackupfolder
echo "psync is complete lets unoumt the backup drive"
umount /Volumes/mybackupfolder
echo "Backup is done"
---


In /etc/crontab
--
5 5 * * * root /bin/sh /Users/myusername/Documents/backup.sh
---



[ Reply to This | # ]