Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 22nd March 2006, 15:58
tron tron is offline
Junior Member
 
Join Date: Dec 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default No .htaccess in automatic backup?

I've noticed that the automatic backup functionality doesn't backup .htaccess files. The man page of zip explains that I need to add ".* *" instead of just "*" as a parameter to include them. EDIT: them = files starting with a dot

Looking at /root/ispconfig/scripts/shell/backup.php tells me that you are using just the "*" so I thought that changing it to the above would be the way to go. But then I looked at the webN_user.zip and saw files starting with a dot in that zip such as .antivirus.rc. On the other hand the file .no_delete is not included. Now I am confused.

Why is .antivirus.rc included but .htaccess isn't?

I assume you either forgot about .htaccess or there is a good reason to not include .htaccess in the backup. What reason would that be?

If I want to include .htaccess in the backup, changing
Quote:
exec("cd $web_pfad; $zip -r $tmp_dir/web".$web_id."_web.zip *");
to
Quote:
exec("cd $web_pfad; $zip -r $tmp_dir/web".$web_id."_web.zip .* *");
would do the trick, wouldn't it? Running "zip test.zip .* *" works for me.

Thank you very much.

Last edited by tron; 22nd March 2006 at 16:06.
Reply With Quote
Sponsored Links
  #2  
Old 22nd March 2006, 16:39
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by tron
But then I looked at the webN_user.zip and saw files starting with a dot in that zip such as .antivirus.rc. On the other hand the file .no_delete is not included. Now I am confused.
I guess this has something to do with permissions: .no_delete is owned by root and has 400 permissions. It must be similar with the other files that are not included in the zip file.
__________________
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 22nd March 2006, 17:46
tron tron is offline
Junior Member
 
Join Date: Dec 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

First of all, I need to revise my statement from above. .htaccess files are included in the backup except /var/www/webN/web/.htaccess. Sorry for that.

I just verifed your point with my setup:

All .no_delete files are owned by root and have 400 permissions
All .antivirus.rc files etc. except .vacation.cache are owned by root and have 644 permissions
All /var/www/webN/web/.htaccess files are owned by root and have 644 permissions

I've got one .htaccess two directory levels further down with the same permissions and this one is included in the backup as well. The one from /var/www/webN/web/stats/ is owned by the respective user and has 664 permissions. They are also included in the backup.

So, permissions shouldn't be the problem, should they?

Anyway, I have now changed the appropriate line in the backup script to
Quote:
exec("cd $web_pfad; $zip -r $tmp_dir/web".$web_id."_web.zip .htaccess *");
This seems to work whereas
Quote:
exec("cd $web_pfad; $zip -r $tmp_dir/web".$web_id."_web.zip .* *");
gave me all sorts of errors when unzipping the zip file.
Reply With Quote
  #4  
Old 22nd March 2006, 18:03
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
 
Default

Quote:
Originally Posted by tron
All .no_delete files are owned by root and have 400 permissions
All .antivirus.rc files etc. except .vacation.cache are owned by root and have 644 permissions
All /var/www/webN/web/.htaccess files are owned by root and have 644 permissions
Files with 644 permissions should always be included, as everybody has read permissions. Files with 400 are only included if the backup is run as the file owner.
__________________
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
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
eGroupWare Install crudolphy General 28 5th June 2007 19:09
How do I enable automatic backup? drsintoma Installation/Configuration 36 12th September 2006 16:17
Backup question Piccent Installation/Configuration 10 13th March 2006 00:12
email + backup blackflag Installation/Configuration 3 7th March 2006 11:38
How to disable automatic backup? ddelbia General 4 22nd January 2006 16:40


All times are GMT +2. The time now is 22:38.


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