HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   Error running backup on site (http://www.howtoforge.com/forums/showthread.php?t=61072)

happz 22nd March 2013 03:49

Error running backup on site
 
I run manual backups. I do this to preserving the client rights to all the file. after going to /var/www/clients/client1/web1 I then run this command:

tar -pczf backup.tar.gz web

Now this has always worked fine but now I get this-

tar -pczf backup.tar.gz web
tar (child): backup.tar.gz: Cannot open: Permission denied
tar (child): Error is not recoverable: exiting now


Any ideas forger's?

almere 22nd March 2013 11:22

Quote:

Originally Posted by happz (Post 294481)
I run manual backups. I do this to preserving the client rights to all the file. after going to /var/www/clients/client1/web1 I then run this command:

tar -pczf backup.tar.gz web

Now this has always worked fine but now I get this-

tar -pczf backup.tar.gz web
tar (child): backup.tar.gz: Cannot open: Permission denied
tar (child): Error is not recoverable: exiting now


Any ideas forger's?

Yo!

Try this:

Code:

gunzip backup.tar.gz
tar xf backup.tar


florian030 22nd March 2013 12:30

@almere
gunzip or tar x has nothing to do with creating archives.

@happz
You canīt write to the web-directory as long as the immutable-attribute is set for security-reasons. If you must create your backups in /var/www/clients/client1/web1, run

chattr -i /var/www/clients/client1/web1

create your backups

reset the attribute with chattr +i /var/www/clients/client1/web1

You can also disable this feature under serverconfig/web/Make web folders immutable.

happz 23rd March 2013 00:46

Okay
 
I will try this. What I'm backing up is just web1 and just the /web folder but I must have the ability to restore the site with the proper right as they were before. Will this command do this?

thx,
happz

florian030 23rd March 2013 09:01

chattri has nothing to do HOW you create your backups.Is there any reason why you wonīt use the backup-solution from ispconfig? it easily backups the web-folder and the database and the user can restore it over the interface.

happz 23rd March 2013 16:12

Thank you for this info
 
Quote:

Originally Posted by florian030 (Post 294542)
chattri has nothing to do HOW you create your backups.Is there any reason why you wonīt use the backup-solution from ispconfig? it easily backups the web-folder and the database and the user can restore it over the interface.

To be honest, I'm not sure. Since I moved to the new version of ispconfig, I stopped using the built-in backup because it didn't backup the database (so i thought) and I really wasn't sure how to restore while maintaining the correct rights.

Would you share the process of how to restore using the backup feature in ispconfig's newest version?

As a note, I already have the back-ups set for 1 daily for the site in question.

Thx,
happz

florian030 23rd March 2013 19:08

To backup the databse you must "attach" the DB to the website (define the corresponding website under databases / site).

To restore the internal backup just select the datbase and/or website an click "restore" from the backup-tab.

happz 23rd March 2013 19:40

Quote:

Originally Posted by florian030 (Post 294564)
To backup the database you must "attach" the DB to the website (define the corresponding website under databases / site).

To restore the internal backup just select the database and/or website an click "restore" from the backup-tab.

Wow, I had no idea that this feature existed. Of course, I'd been running my own for over a year so I just didn't pay attention.

I went to database and attached web1 to db1, so I'm guessing that it will back both the db and the web folder now.

I didn't choose any of the other options such as Database charset, Read-only... assuming it would take to the common default. True on that?

thank you florian030,

Happz

florian030 23rd March 2013 21:22

Yes. This should work.

happz 23rd June 2013 15:40

Back to the same problem
 
I just built a new ispconfig run server and created 4 sites. I'm trying to run a manual backup (to quickly backup before I make a change) like this, [tar -pczf backup.tar.gz /path/to/web/site
] and I'm back to getting this:

root@srvr:/var/www/clients/client1/web1# tar -pczf saved.tar.gz web
tar (child): saved.tar.gz: Cannot open: Permission denied
tar (child): Error is not recoverable: exiting now
root@srvr:/var/www/clients/client1/web1#

Thanks in advance!

happz


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

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