backup script

Moderator: ikkebra

Post Reply
ikkebra
Forum N00b
Forum N00b
Posts: 5
Joined: Thu Jun 08, 2006 5:10 pm
Contact:

backup script

Post by ikkebra »

I really could use that backup script right about now :cry:
bruhv
Site Admin
Site Admin
Posts: 59
Joined: Thu Jun 08, 2006 11:55 am
Location: Afghanistan
Contact:

Post 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 :/
Image
drug free since 11:28pm 26/3/06 :D

www.robnicklin.com

You're so fucking special, I wish I was special
bruhv
Site Admin
Site Admin
Posts: 59
Joined: Thu Jun 08, 2006 11:55 am
Location: Afghanistan
Contact:

Post 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 ;)
Image
drug free since 11:28pm 26/3/06 :D

www.robnicklin.com

You're so fucking special, I wish I was special
ikkebra
Forum N00b
Forum N00b
Posts: 5
Joined: Thu Jun 08, 2006 5:10 pm
Contact:

Post 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.........
bruhv
Site Admin
Site Admin
Posts: 59
Joined: Thu Jun 08, 2006 11:55 am
Location: Afghanistan
Contact:

Post by bruhv »

in time.........
Image
drug free since 11:28pm 26/3/06 :D

www.robnicklin.com

You're so fucking special, I wish I was special
bruhv
Site Admin
Site Admin
Posts: 59
Joined: Thu Jun 08, 2006 11:55 am
Location: Afghanistan
Contact:

Post by bruhv »

¡]<]<e]3r4 wrote:Now if only the logo was clickable to go to the index page.........
job done
Image
drug free since 11:28pm 26/3/06 :D

www.robnicklin.com

You're so fucking special, I wish I was special
ikkebra
Forum N00b
Forum N00b
Posts: 5
Joined: Thu Jun 08, 2006 5:10 pm
Contact:

Post by ikkebra »

you're a star
bruhv
Site Admin
Site Admin
Posts: 59
Joined: Thu Jun 08, 2006 11:55 am
Location: Afghanistan
Contact:

Post by bruhv »

you're a laggamuffin
Image
drug free since 11:28pm 26/3/06 :D

www.robnicklin.com

You're so fucking special, I wish I was special
ikkebra
Forum N00b
Forum N00b
Posts: 5
Joined: Thu Jun 08, 2006 5:10 pm
Contact:

Post 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
Post Reply