Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Plugins/Modules/Addons

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #71  
Old 1st October 2010, 21:45
cwallace cwallace is offline
Junior Member
 
Join Date: Sep 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That would be tremendously helpful...
Reply With Quote
Sponsored Links
  #72  
Old 20th October 2010, 19:59
clttech clttech is offline
Junior Member
 
Join Date: Mar 2009
Posts: 15
Thanks: 1
Thanked 0 Times in 0 Posts
Default Permission Denied

I have the scrip copied to the /etc folder. I have a cron job setup for the job to run.
40 3 * * * /etc/back-res.sh 1>/dev/null 2>/dev/null

It has not run. I logged in switched to su and ran ./backup_res.sh and I get Permission denied. What should the permissions be set at?
Reply With Quote
  #73  
Old 21st October 2010, 02:06
wiss wiss is offline
Member
 
Join Date: Oct 2010
Posts: 68
Thanks: 2
Thanked 4 Times in 4 Posts
Default

Hi!!!

Great works,

Work fine, It's simply perfect.

More Thx.
Reply With Quote
  #74  
Old 21st October 2010, 12:09
skoena skoena is offline
Senior Member
 
Join Date: Sep 2009
Location: Emmen, Netherlands
Posts: 421
Thanks: 78
Thanked 14 Times in 12 Posts
Send a message via MSN to skoena Send a message via Skype™ to skoena
Default

Quote:
Originally Posted by clttech View Post
I have the scrip copied to the /etc folder. I have a cron job setup for the job to run.
40 3 * * * /etc/back-res.sh 1>/dev/null 2>/dev/null

It has not run. I logged in switched to su and ran ./backup_res.sh and I get Permission denied. What should the permissions be set at?
Chmod it to 777
Reply With Quote
  #75  
Old 24th October 2010, 11:17
go0ogl3 go0ogl3 is offline
Member
 
Join Date: Jul 2008
Posts: 73
Thanks: 5
Thanked 39 Times in 6 Posts
Default

Quote:
Originally Posted by clttech View Post
I have the scrip copied to the /etc folder. I have a cron job setup for the job to run.
40 3 * * * /etc/back-res.sh 1>/dev/null 2>/dev/null

It has not run. I logged in switched to su and ran ./backup_res.sh and I get Permission denied. What should the permissions be set at?
Did you restarted the cron daemon? Did you edited the right cron file? Some distributions use the /etc/crontab file. To be sure use
Code:
crontab -e
then save and restart de cron daemon.
Reply With Quote
  #76  
Old 3rd November 2010, 18:26
drewb0y drewb0y is offline
Senior Member
 
Join Date: Sep 2010
Posts: 103
Thanks: 10
Thanked 14 Times in 7 Posts
Question Finally setting up backup - a few errors

when I first ran back-res to test it out I got
Code:
/etc/back-res: line 229: /tmp/tmpbck/maildata: No such file or directory
/etc/back-res: line 235: /tmp/tmpbck/maildata: No such file or directory
/etc/back-res: line 220: /tmp/tmpbck/maildata: No such file or directory
/etc/back-res: line 220: /tmp/tmpbck/maildata: No such file or directory
/etc/back-res: line 220: /tmp/tmpbck/maildata: No such file or directory
mysqlcheck: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
I killed the script at this point. Checked in the /tmp/tmpbck directory and this is what I got
Code:
gateway:/tmp/tmpbck# ls -al
total 20
drwxr-xr-x 2 root root 4096 2010-11-03 11:11 .
drwxrwxrwt 5 root root 4096 2010-11-03 11:12 ..
-rw-r--r-- 1 root root  278 2010-11-03 11:11 excluded
-rw-r--r-- 1 root root    1 2010-11-03 11:11 full-backup_home.lck
-rw-r--r-- 1 root root  861 2010-11-03 11:11 maildata
Could the first error be a permissions issue?
And as for the MySQL error, I did enter the correct password in the script. I can log in with this same password using phpmyadmin.

I have an external USB 320GB drive mounted to /backups/external and there is a directory created for the computer name.

Here is my variables section with the password changed and domain name.
Code:
COMPUTER=`cat /etc/hostname | awk 'NR==1{print $1}'`    # name of this computer
DIRECTORIES="/bin /boot /etc /home /lib /lib64 /root.
/sbin /usr /var /www"                    # directories to backup
EXCLUDED="/bck /tmp /dev /proc /sys /srv /media
/var/adm /var/cache /var/lib/mysql
/var/run /var/lock /lib/init/rw /var/tmp
/var/log/verlihub /var/lib/amavis /var/amavis /var/spool/postfix/p*
/var/spool/postfix/var *.pid *.lock *.lck"        # exclude those dir's and files
BACKUPDIR="/backups/external/$COMPUTER"                # where to store the backups
dbuser="root"                        # database user
dbpassword="mypassword"                # database password
email="backup@mydomain.com"                # mail for the responsible person
TAR=`which tar`                        # name and location of tar
ARG="-cjpSPf"        #sparse                # tar arguments P = removed /.
EARG="-xjpf"                        # tar extract arguments P = removed /
tmpdir="/tmp/tmpbck"                    # temp dir for database dump and other stuff
del_en="yes"                        # Enable delete of files if used space percent > than $maxp (yes or anything else)
maxp="85"                        # Max percent of used space before start of delete
hm="2359"                        # last minute of the day = last minute of the restored backup of the day restored
I am able to login as root to mysql using the terminal command
Code:
mysql -u root -p
successfully.
__________________
ISPConfig 3.0.5.4p1 - The Perfect Server - Debian Wheezy (nginx, BIND, Dovecot, ISPConfig 3)
Installed on Debian 7.6 on a KVM VPS

Last edited by drewb0y; 3rd November 2010 at 18:33. Reason: additional info
Reply With Quote
  #77  
Old 3rd November 2010, 23:10
wiss wiss is offline
Member
 
Join Date: Oct 2010
Posts: 68
Thanks: 2
Thanked 4 Times in 4 Posts
Default

Great job.
Thak you so much.

I use it, but script not send email after complete jobs, Why?

Have any confguration more?

Thx.
__________________
Reparacion ordenadores | Reparacion portatiles
Pd: Sorry for my english...
Reply With Quote
  #78  
Old 5th November 2010, 08:06
drewb0y drewb0y is offline
Senior Member
 
Join Date: Sep 2010
Posts: 103
Thanks: 10
Thanked 14 Times in 7 Posts
Default Solved...I think

Quote:
Originally Posted by drewb0y View Post
when I first ran back-res to test it out I got
Code:
/etc/back-res: line 229: /tmp/tmpbck/maildata: No such file or directory
/etc/back-res: line 235: /tmp/tmpbck/maildata: No such file or directory
/etc/back-res: line 220: /tmp/tmpbck/maildata: No such file or directory
/etc/back-res: line 220: /tmp/tmpbck/maildata: No such file or directory
/etc/back-res: line 220: /tmp/tmpbck/maildata: No such file or directory
Solved by deleting the backup directory that I manually created instead of just letting the script do it.


Quote:
Code:
mysqlcheck: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Solved: my password had some characters init that confused it I guess, it was 15 characters long with mixed Upper and lower case characters, numbers and 2 special characters, an @ and a $. Not sure which messed it up, but changing

Code:
dbpassword="mypassword"
to
Code:
dbpassword='mypassword'
(single quotes on either side instead of double) seems to have fixed that.

After that - just a few errors for the default script trying to back up non existent directories such as
Code:
/bin/tar: /lib64: Cannot stat: No such file or directory
Just a little more modifying and I think I am good to go.

For go0ogl3 :

What is your OS version? Just curious.. Thanks for the great work!
__________________
ISPConfig 3.0.5.4p1 - The Perfect Server - Debian Wheezy (nginx, BIND, Dovecot, ISPConfig 3)
Installed on Debian 7.6 on a KVM VPS
Reply With Quote
  #79  
Old 7th November 2010, 21:07
go0ogl3 go0ogl3 is offline
Member
 
Join Date: Jul 2008
Posts: 73
Thanks: 5
Thanked 39 Times in 6 Posts
Default

Quote:
Originally Posted by wiss View Post
Great job.
Thak you so much.

I use it, but script not send email after complete jobs, Why?

Have any confguration more?

Thx.
The script is sending mail only if you have a valid and working mail command ("mail" command is used in the script)... I hope I'll have time to enhance it.
Reply With Quote
  #80  
Old 7th November 2010, 21:12
go0ogl3 go0ogl3 is offline
Member
 
Join Date: Jul 2008
Posts: 73
Thanks: 5
Thanked 39 Times in 6 Posts
 
Default

Quote:
Originally Posted by drewb0y View Post
Solved by deleting the backup directory that I manually created instead of just letting the script do it.




Solved: my password had some characters init that confused it I guess, it was 15 characters long with mixed Upper and lower case characters, numbers and 2 special characters, an @ and a $. Not sure which messed it up, but changing

Code:
dbpassword="mypassword"
to
Code:
dbpassword='mypassword'
(single quotes on either side instead of double) seems to have fixed that.

After that - just a few errors for the default script trying to back up non existent directories such as
Code:
/bin/tar: /lib64: Cannot stat: No such file or directory
Just a little more modifying and I think I am good to go.

For go0ogl3 :

What is your OS version? Just curious.. Thanks for the great work!
The configurable section of the script it's meant to be configurable... I'll try in future versions to make it more user friendly, maybe will work by default

I'm using mainly Slackware. Is the best in my oppinion.
Reply With Quote
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
freebsd 7, samba 3, domain controller alexdimarco Suggest HOWTO 6 5th November 2010 17:54
how to restore Ispconfig from backup db na0lb Installation/Configuration 4 24th September 2008 09:51
Restore backup ISPConfig leeeonardo General 4 18th April 2007 21:21
Restore ispconfig complete backup statiic General 1 15th January 2007 11:32
Backup restore on ispconfig misterm Installation/Configuration 0 19th December 2005 00:32


All times are GMT +2. The time now is 17:55.


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