Technology news and Jobs
Seeking Nerdvana
The Road to Ubuntu - Backup Salvation
Seeking Nerdvana
The Road to Ubuntu - Backup Salvation | The Road to Ubuntu - Backup Salvation |
|
|
|
| Written by Adam Turner | |
| Monday, 05 November 2007 | |
|
Page 4 of 4 After the steep learning curve of developing my local backup script, creating one for FTP proved relatively easy.
# Source
# Destination folder on FTP server
### FTP SERVER Login info ###
# delete oldest folder
#rename folderswhile [ $count -gt 1 ]
do old=`expr $count - 1` count=`expr $count - 1`
# tarball files in temp folder
# make new dir on server, upload tarball, delete temp tarball (-E)lftp -u $FTPU,$FTPP -e "mkdir /${des}/1; cd /${des}/1; mput -E /tmp/backup_${now}.tar.gz; quit" $FTPS
I tried to use "find ${des}/* -mtime +5 -exec rm {} \;" to delete old folders, but I couldn't get it to work with lftp. All that was left now was to add the two scripts to crontab (the task scheduler) so they'll run automatically - every 10 minutes to the network drive and every 30 minutes to the FTP site;
10 * * * * /home/adam/Documents/scripts/backup-inprog-hyperspace.sh
So that's how I found backup salvation with Ubuntu. While it was a steep learning curve, most of my problems were due to the fact I was using a FAT32 network drive - a legacy from Windows World. Moving to any new OS is always going to present challenges, so I'm not holding a grudge against the penguin. Now we've got this backup problem sorted, hopefully we can get down to business. PREVIOUS POST: The Road to Ubuntu - Backup Hell NEXT POST: The Road to Ubuntu (or Leopard) - screw the OS, move your apps online with Google {moscomment}
Get stories like this delivered daily - FREE - subscribe now When you subscribe get a 12 months license for LiveProject Valued at $99 USD |
| < Prev | Next > |
|---|



Tags


Subscribe to iTWire's daily e-newsletter now and get a FREE 12 month license to project management software valued at $99 USD. 





