#1  
Old 18th June 2009, 12:06
SamTzu SamTzu is offline
HowtoForge Supporter
 
Join Date: Apr 2007
Location: Helsinki
Posts: 438
Thanks: 34
Thanked 56 Times in 39 Posts
Send a message via Skype™ to SamTzu
Default Scripts

Hi, there.

Can someone enlighten me how you do maintenance on your server?
I would be interested in any scripts you use.
For instance, how to copy/sync folders automatically etc.
__________________

Sami Mattila
Internet-Content

Telephone:
00358942833310
Email: firstname.lastname@internet-content.org
Shop: http://shop.internet-content.net
Site: http://www.internet-content.net
Blog: http://www.internet-content.net/en/blog
FB: https://www.facebook.com/internetcontent

Reply With Quote
Sponsored Links
  #2  
Old 19th June 2009, 17:00
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,748 Times in 2,579 Posts
Default

For what tasks exactly? Backups?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 20th June 2009, 21:48
SamTzu SamTzu is offline
HowtoForge Supporter
 
Join Date: Apr 2007
Location: Helsinki
Posts: 438
Thanks: 34
Thanked 56 Times in 39 Posts
Send a message via Skype™ to SamTzu
Default

Anything. I rarely see ANY scripts and since I'm so poor (read=lazy) at making them my self I'd like to see some that you members find useful.

Backup is good (although I suspect most people use other software like BackupPC or Amanda to do it.)

I'm currently looking a way to ease my life with multiple Joomla updates.
Every time an update comes by I have to extract the zip file and do a copy to all folders under /var/www/domain1.com/web/ folder and then domain2 etc.

Booooring....

Also a script to backup databases to each domain's tmp folder would be a really great.

Anything really. Open stuff is so great because you can just take what you want and modify it to suit your needs.
__________________

Sami Mattila
Internet-Content

Telephone:
00358942833310
Email: firstname.lastname@internet-content.org
Shop: http://shop.internet-content.net
Site: http://www.internet-content.net
Blog: http://www.internet-content.net/en/blog
FB: https://www.facebook.com/internetcontent

Reply With Quote
  #4  
Old 21st June 2009, 17:05
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,748 Times in 2,579 Posts
Default

For backups, I'm using a combination of these two tutorials:
http://www.howtoforge.com/back_up_my..._interruptions
http://www.howtoforge.com/mirroring_with_rsync
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 10th July 2009, 19:13
BorderAmigos BorderAmigos is offline
Senior Member
 
Join Date: Apr 2008
Location: San Diego & Tijuana
Posts: 302
Thanks: 26
Thanked 33 Times in 31 Posts
Send a message via MSN to BorderAmigos Send a message via Yahoo to BorderAmigos
 
Default

I use a couple real simple scripts for backup. They are on cron jobs. The one to copy the websites and database runs every night. They system backup runs once a week. Right now I move the older backups to a different folder then delete them manually but will change it to automatically delete older ones (to not fill up the disk). Note that the location of the backups is a different physical disk than the data being backed up.

backup_sites_database.sh
Quote:
#!/bin/sh
find /media/data/backup/*.tgz -mtime +14 -exec mv {} /media/data/backup/saved_backups \; > /media/data/backup/sites_database_backup_$(date +%y%m%d).txt
tar czPf /media/data/backup/mysql_backup_$(date +%y%m%d).tgz /var/lib/mysql >> /media/data/backup/sites_database_backup_$(date +%y%m%d).txt
tar czPf /media/data/backup/sites_backup_$(date +%y%m%d).tgz /var/www >> /media/data/backup/sites_database_backup_$(date +%y%m%d).txt
backup_system.sh
Quote:
#!/bin/sh
echo "Start Time" > /media/data/backup/system_backup_$(date +%y%m%d).txt
date >> /media/data/backup/system_backup_$(date +%y%m%d).txt
echo "/n Hardware Info" >> /media/data/backup/system_backup_$(date +%y%m%d).txt
hwinfo >> /media/data/backup/system_backup_$(date +%y%m%d).txt
tar czPf /media/data/backup/system_backup_$(date +%y%m%d).tgz --exclude=/proc --exclude=/dev --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys --exclude=/var/spool --exclude=/var/cache --exclude=/var/run --exclude=/media --exclude=/tmp --exclude=/home/servidora/Desktop --exclude=/home/servidora/.aMule/Incoming --exclude=/home/servidora/.aMule/Temp / >> /media/data/backup/system_backup_$(date +%y%m%d).txt
echo "Stop Time" >> /media/data/backup/system_backup_$(date +%y%m%d).txt
date >> /media/data/backup/system_backup_$(date +%y%m%d).txt

Note: Reading Falkos tutorial is a better way of course to back up the mysql databases. I have so little traffic that I'm not very concerned with the data changing while it's being backed up. I may implement the slave mysql server if I have that concern.
__________________
System6Hosting.com, ISPConfig 3, Debian.

Last edited by BorderAmigos; 10th July 2009 at 19:21.
Reply With Quote
The Following User Says Thank You to BorderAmigos For This Useful Post:
SamTzu (8th September 2009)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help Linux Scripts medix1313 Programming/Scripts 2 16th June 2009 11:43
ispconfig 2.2.21 and system-wide php scripts... kainhofer Installation/Configuration 3 13th March 2008 18:44
rc scripts in users directories todvard Installation/Configuration 4 15th February 2007 20:04
PHP scripts don't work, please help. CombatGod Installation/Configuration 9 11th May 2006 18:37
PERL scripts in Mozilla Browser Deepthi Server Operation 3 20th December 2005 15:01


All times are GMT +2. The time now is 01:11.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.