
30th August 2012, 14:03
|
|
Senior Member
|
|
Join Date: Nov 2008
Location: Rajkot, India
Posts: 173
Thanks: 5
Thanked 12 Times in 12 Posts
|
|
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
|

6th November 2012, 04:32
|
|
Junior Member
|
|
Join Date: Oct 2012
Posts: 17
Thanks: 5
Thanked 1 Time in 1 Post
|
|
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.
|

9th November 2012, 20:46
|
|
Member
|
|
Join Date: Dec 2011
Posts: 94
Thanks: 17
Thanked 9 Times in 7 Posts
|
|
VM is the Perfect Solution. VM is better than physical server from the viewpoint of maintenance and security.
|

27th November 2012, 16:45
|
|
Junior Member
|
|
Join Date: Oct 2012
Posts: 17
Thanks: 5
Thanked 1 Time in 1 Post
|
|
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.
|

27th November 2012, 17:11
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,903
Thanks: 693
Thanked 4,195 Times in 3,212 Posts
|
|
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
|
|

27th November 2012, 17:45
|
|
Junior Member
|
|
Join Date: Oct 2012
Posts: 17
Thanks: 5
Thanked 1 Time in 1 Post
|
|
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
|
|
The Following User Says Thank You to harrythehamster For This Useful Post:
|
|

5th January 2013, 15:59
|
|
Junior Member
|
|
Join Date: Jan 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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!
|

5th January 2013, 23:59
|
|
Junior Member
|
|
Join Date: Jan 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

6th January 2013, 00:50
|
|
Junior Member
|
|
Join Date: Jan 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

6th February 2013, 23:52
|
|
Member
|
|
Join Date: Nov 2008
Posts: 46
Thanks: 5
Thanked 0 Times in 0 Posts
|
|
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?
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 05:52.
|
|
Recent comments
1 day 4 min ago
1 day 6 hours ago
1 day 10 hours ago
1 day 12 hours ago
1 day 20 hours ago
2 days 6 hours ago
2 days 6 hours ago
2 days 10 hours ago
2 days 14 hours ago
2 days 15 hours ago