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
  #171  
Old 30th August 2012, 14:03
dipeshmehta dipeshmehta is offline
Senior Member
 
Join Date: Nov 2008
Location: Rajkot, India
Posts: 173
Thanks: 5
Thanked 13 Times in 13 Posts
Send a message via Yahoo to dipeshmehta Send a message via Skype™ to dipeshmehta
Default

Hello go0ogl3,

I want to run my backups as - full backups on Sundays and daily incremental backups on weekdays, what changes do I need to make?

Dipesh
Reply With Quote
Sponsored Links
  #172  
Old 6th November 2012, 04:32
harrythehamster harrythehamster is offline
Junior Member
 
Join Date: Oct 2012
Posts: 20
Thanks: 7
Thanked 1 Time in 1 Post
Default

Hello

I have been advised to use this script to make a backup of my files. I was looking for a way to backup all of my sites on ispconfig and restore them including all mysql databases so that I can install a fresh ispconfig install if my server gets comprimised.

I have managed to make the backups but I cannot work out how the restore part works.

I am using Debian 6 and any advice would be great
Thanks.
Reply With Quote
  #173  
Old 9th November 2012, 20:46
concept21 concept21 is offline
Senior Member
 
Join Date: Dec 2011
Posts: 142
Thanks: 27
Thanked 17 Times in 13 Posts
Default

VM is the Perfect Solution. VM is better than physical server from the viewpoint of maintenance and security.
Reply With Quote
  #174  
Old 27th November 2012, 16:45
harrythehamster harrythehamster is offline
Junior Member
 
Join Date: Oct 2012
Posts: 20
Thanks: 7
Thanked 1 Time in 1 Post
Default

Hello

I am still very unclear on how you restore the backup files that are created with the backup script. The script says backup and restore. I have managed the backup bit but how do you restore the files please.

This is the only thing now stopping me from using ISPConfig on my vps server to host my sites and blogs. As soon as I have this sorted out I can go ahead and move my sites to my vps knowing that they would be secure and I would have a backup to restore if my vps got comprimised.

Thanks

Last edited by harrythehamster; 27th November 2012 at 16:50.
Reply With Quote
  #175  
Old 27th November 2012, 17:11
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,488
Thanks: 813
Thanked 5,259 Times in 4,123 Posts
Default

Take a look into the script, the restore procedure is described in the comments at the beginning of the script:

Quote:
# Restore part -============================

# Restore is meant to be little interactive, the messages are on standard output
# Dir's are restored verbose with tar by default.
# Last minute of the day "$hm" is set to 2359 but the backup is started at 03:40
# so this should be set AFTER the backup has ended! At 23:59 of the backup day
# we can have many files modified from the 03:40. The not so perfect solution is
# to backup later in the day (23:00) and hope the backup finishes until 23:59
# My server is still loaded on the 23:00, so I use 03:40 in cron and hm=2359
# because a full backup last for more than 16 hours for tar.bz2
# For sure I will loose all files created between 03:40 and 23:59 of that day.
# To prevent that I can restore files one day AFTER the day I want to restore
# and use find --newer to delete unwanted files.

# To restore dirs make sure you have the full backup from that month and use:
# `back-res dir /etc 2009-11-23 /`
# to restore the "/etc" dir from date 2009-11-23 to root
# `back-res dir /etc 2009-11-23 /tmp` is used to restore the "/etc" dir to /tmp
#
# `back-res dir all 2009-11-23 /`
# to restore all directories from date 2009-11-23 to root

# To restore databases use:
# `back-res db mysql 2009-11-23`
# to restore the "mysql" database from date 2009-11-23 to local mysql server
#
# `back-res db all 2009-11-23`
# to restore all databases from date 2009-11-23 to local mysql server
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #176  
Old 27th November 2012, 17:45
harrythehamster harrythehamster is offline
Junior Member
 
Join Date: Oct 2012
Posts: 20
Thanks: 7
Thanked 1 Time in 1 Post
Default

Thanks for your reply Till

I have read the 'comments' section of the script and that is what I cannot understand.

So lets say for example my vps gets comprimised/hacked and I have to reinstall ispconfig 3 and I need to reinstall all of my sites from the backup.

How do I do this?

Do I upload all of the backup files that I downloaded prior to me reinstalling the OS and Ispconfig then use SSH and put the command:-

back-res db mysql date

and so on to restore all of those files and have my ftp, mysql databases, sites and blogs working again?

Thanks
Reply With Quote
The Following User Says Thank You to harrythehamster For This Useful Post:
aangelatexaxda9431 (7th February 2013)
  #177  
Old 5th January 2013, 15:59
Fredda Fredda is offline
Junior Member
 
Join Date: Jan 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Complete backup and restore

Hello,

It's been awhile since I last was on this forum, so my old user was deleted
My hosting company is upgrading their infrastructure, so I have to upgrade my server. The old server is running Ubuntu 10.04 with Ispconfig3, on the new server I have installed Ubuntu 12.04 and Ispconfig3.

Can I use this script to backup the old server and restore it on the new server without any compatibility issues?

Thanks for the great software and forum!
Reply With Quote
  #178  
Old 5th January 2013, 23:59
chmadk chmadk is offline
Junior Member
 
Join Date: Jan 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problems with script

Hello.

Now ive tried both an Ubuntu 12.10 Server
And an debian 6.

Both of them can backup just fine !

but when i try the restore database. I get the mysql -x error.. its on all of the servers.. It looks like its eating the Tar command in the script and then not knowing what to do next
Reply With Quote
  #179  
Old 6th January 2013, 00:50
chmadk chmadk is offline
Junior Member
 
Join Date: Jan 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Since nobody ddid anything i did it myself..

i know it may not be the best way to do it.. but now it works for me at least !
From line 550 and forward.. this fixes the restore script if you keep getting the -x is not valid blah blah.
Code:
for i in $arh ; do
                rdb=`echo $i | cut -d "-" -f2`
                edb=`echo $i | cut -d "." -f1`
                $TAR $EARG $BACKUPDIR/$YDATE-$MDATE/$i
                mysql -u$dbuser -p$dbpassword $rdb < $edb.sql
                rm $edb.sql
            done
Reply With Quote
  #180  
Old 6th February 2013, 23:52
Rashef Rashef is offline
Member
 
Join Date: Nov 2008
Posts: 58
Thanks: 7
Thanked 1 Time in 1 Post
 
Default

Hi guys,
using the script on a CentoOS with ISPConfig3, I get the following output:

Code:
# ./bak-res.sh 
./bak-res.sh: line 226: /tmp/tmpbck/maildata: No such file or directory
./bak-res.sh: line 229: /tmp/tmpbck/maildata: No such file or directory
./bak-res.sh: line 235: /tmp/tmpbck/maildata: No such file or directory
./bak-res.sh: line 220: /tmp/tmpbck/maildata: No such file or directory
./bak-res.sh: line 220: /tmp/tmpbck/maildata: No such file or directory
./bak-res.sh: line 220: /tmp/tmpbck/maildata: No such file or directory
c1gus01.ft_rp_address
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_event_cite
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_event_detail
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_event_note
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_fam
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_fam_child
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_fam_cite
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_fam_event
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_fam_note
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_header
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_indi
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_indi_cite
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_indi_event
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_indi_fam
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_indi_name
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_indi_note
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_indi_option
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_name_cite
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_name_name
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_name_note
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_name_personal
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_note
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_repo
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_repo_note
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_source
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_source_cite
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_source_note
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_submitter
note     : Table does not support optimize, doing recreate + analyze instead
c1gus01.ft_rp_submitter_note
note     : Table does not support optimize, doing recreate + analyze instead
mysql.general_log
note     : The storage engine for the table doesn't support optimize
mysql.slow_log
note     : The storage engine for the table doesn't support optimize
mysqldump: Got error: 1044: Access denied for user 'root'@'localhost' to database 'information_schema' when using LOCK TABLES
tar (child): /bkp/MYSERVER/myserver.int/2013-02/db-c1doop-2013-02-06.tar.bz2: Cannot open: Permission denied
tar (child): Error is not recoverable: exiting now
tar (child): /bkp/MYSERVER/myserver.int/2013-02/db-c1gus01-2013-02-06.tar.bz2: Cannot open: Permission denied
tar (child): Error is not recoverable: exiting now
tar (child): /bkp/MYSERVER/myserver.int/2013-02/db-c1icom01-2013-02-06.tar.bz2: Cannot open: Permission denied
tar (child): Error is not recoverable: exiting now
tar (child): /bkp/MYSERVER/myserver.int/2013-02/db-c1meu01-2013-02-06.tar.bz2: Cannot open: Permission denied
tar (child): Error is not recoverable: exiting now
tar (child): /bkp/MYSERVER/myserver.int/2013-02/db-c1morg01-2013-02-06.tar.bz2: Cannot open: Permission denied
tar (child): Error is not recoverable: exiting now
tar (child): /bkp/MYSERVER/myserver.int/2013-02/db-c2nitesite-2013-02-06.tar.bz2: Cannot open: Permission denied
tar (child): Error is not recoverable: exiting now
tar (child): /bkp/MYSERVER/myserver.int/2013-02/db-dbispconfig-2013-02-06.tar.bz2: Cannot open: Permission denied
tar (child): Error is not recoverable: exiting now
tar (child): /bkp/MYSERVER/myserver.int/2013-02/db-mysql-2013-02-06.tar.bz2: Cannot open: Permission denied
tar (child): Error is not recoverable: exiting now
tar (child): /bkp/MYSERVER/myserver.int/full_boot-2013-02-06.tar.bz2: Cannot open: Permission denied
tar (child): Error is not recoverable: exiting now
tar (child): /bkp/MYSERVER/myserver.int/full_etc-2013-02-06.tar.bz2: Cannot open: Permission denied
tar (child): Error is not recoverable: exiting now
tar (child): /bkp/MYSERVER/myserver.int/full_home-2013-02-06.tar.bz2: Cannot open: Permission denied
tar (child): Error is not recoverable: exiting now
/bin/tar: Child returned status 2
/bin/tar: Error is not recoverable: exiting now
tar (child): /bkp/MYSERVER/myserver.int/full_lib-2013-02-06.tar.bz2: Cannot open: Permission denied
tar (child): Error is not recoverable: exiting now
tar (child): /bkp/MYSERVER/myserver.int/full_root-2013-02-06.tar.bz2: Cannot open: Permission denied
tar (child): Error is not recoverable: exiting now
/bin/tar: Child returned status 2
/bin/tar: Error is not recoverable: exiting now
tar (child): /bkp/MYSERVER/myserver.int/full_sbin-2013-02-06.tar.bz2: Cannot open: Permission denied
tar (child): Error is not recoverable: exiting now
tar (child): /bkp/MYSERVER/myserver.int/full_usr-2013-02-06.tar.bz2: Cannot open: Permission denied
tar (child): Error is not recoverable: exiting now
tar (child): /bkp/MYSERVER/myserver.int/full_var-2013-02-06.tar.bz2: Cannot open: Permission denied
tar (child): Error is not recoverable: exiting now
/bin/tar: /www: Cannot stat: No such file or directory
/bin/tar: Exiting with failure status due to previous errors
./bak-res.sh: line 219: /bkp/MYSERVER/myserver.int/log/backup.log: Permission denied
./bak-res.sh: line 219: /bkp/MYSERVER/myserver.int/log/backup.log: Permission denied
[Exit 1]
Just FYI, I mounted my BOX.NET folder on /bkp using davfs2 and I can perfectly write in there, but:
  • full_www-2013-02-06.tar.bz2 is actually empty
  • There are only 1 DB out of 7 and db-information_schema in the DB folder

what's wrong?
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 16:54
how to restore Ispconfig from backup db na0lb Installation/Configuration 4 24th September 2008 08:51
Restore backup ISPConfig leeeonardo General 4 18th April 2007 20:21
Restore ispconfig complete backup statiic General 1 15th January 2007 10:32
Backup restore on ispconfig misterm Installation/Configuration 0 18th December 2005 23:32


All times are GMT +2. The time now is 21:51.


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