Page 1 of 1
backup script
Posted: Wed Jun 21, 2006 4:55 pm
by ikkebra
I really could use that backup script right about now

Posted: Thu Jun 22, 2006 7:14 am
by bruhv
i still got the database if you reckon you can extract said data
been searching for some killer tool that might open it in a nice n00b friendly way so i can just rip some posts, any pointers? google sucks this morning :/
Posted: Thu Jun 22, 2006 8:55 am
by bruhv
'SCRIPT: File Backup to FTP'
Zips a collection of files and keep 4-days worth on a remote FTP server
Code: Select all
cd /mnt/tivobox/backup/
rm -rf books.tar.gz
tar -czf books.tar.gz /mnt/sda1/books/A-1*.*
ftp <<EOF
open 216.218.219.130
user username password
rm books.tar.gz.oldest
mv books.tar.gz.older books.tar.gz.oldest
mv books.tar.gz.old books.tar.gz.older
mv books.tar.gz books.tar.gz.old
put books.tar.gz
bye
cd /mnt/accounting/books/ //
Go to the folder where the files are
rm -rf books.tar.gz //
Remove the old tar file
tar -czf books.tar.gz /mnt/sda1/books/*.qbb //
Tar the files you want to back up
ftp <<EOF //
Let's FTP, shall we?
open 216.218.219.130 //
Open the IP
user username password //
user bob c0rnh0li0, is this spanish to you?
rm books.tar.gz.oldest //
delete the oldest backup file
mv books.tar.gz.older books.tar.gz.oldest //
move #3 to #4
mv books.tar.gz.old books.tar.gz.older //
move #2 to #3
mv books.tar.gz books.tar.gz.old //
move #1 to #2
put books.tar.gz //
Here comes #1
bye //
<-- the answer is on the postcard
you're welcome

Posted: Thu Jun 22, 2006 1:16 pm
by ikkebra
I actually found a local copy yesterday.
Except I can't get it to work.
Now if only the logo was clickable to go to the index page.........
Posted: Thu Jun 22, 2006 1:24 pm
by bruhv
in time.........
Posted: Thu Jun 22, 2006 2:45 pm
by bruhv
ยก]<]<e]3r4 wrote:Now if only the logo was clickable to go to the index page.........
job done
Posted: Wed Nov 08, 2006 10:07 pm
by ikkebra
you're a star
Posted: Wed Nov 08, 2006 10:50 pm
by bruhv
you're a laggamuffin
Posted: Wed Jan 24, 2007 4:14 pm
by ikkebra
OK, time to start backing things up again, I put it off for too long to start using this script.
Now with 7 days worth of backups!
Code: Select all
cd /mnt/accounting/books/
rm -rf books.tar.gz
tar -czf books.tar.gz /mnt/accounting/books/*.QB*
ftp <<EOF
open domainname.orIPaddress.com
user username password
rm books.7daysold.tar.gz
mv books.6daysold.tar.gz books.7daysold.tar.gz
mv books.5daysold.tar.gz books.6daysold.tar.gz
mv books.4daysold.tar.gz books.5daysold.tar.gz
mv books.3daysold.tar.gz books.4daysold.tar.gz
mv books.2daysold.tar.gz books.3daysold.tar.gz
mv books.1daysold.tar.gz books.2daysold.tar.gz
mv books.tar.gz books.1daysold.tar.gz
put books.tar.gz
bye