Error running backup on site

Discussion in 'General' started by happz, Mar 22, 2013.

  1. happz

    happz New Member

    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?
  2. almere

    almere HowtoForge Supporter


    Try this:

    gunzip backup.tar.gz
    tar xf backup.tar
  3. florian030

    florian030 HowtoForge Supporter

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

    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.
  4. happz

    happz New Member


    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?

  5. florian030

    florian030 HowtoForge Supporter

    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.
  6. happz

    happz New Member

    Thank you for this info

    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.

  7. florian030

    florian030 HowtoForge Supporter

    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.
  8. happz

    happz New Member

    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,

  9. florian030

    florian030 HowtoForge Supporter

    Yes. This should work.
  10. happz

    happz New Member

    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

    Thanks in advance!

    Last edited: Jun 23, 2013
  11. florian030

    florian030 HowtoForge Supporter

    See post #3

    Usually you can´t create a new file or directory in var/www/clients/client1/web1

Share This Page