Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I would like to make a compressed file of my web sites folder and send it to a backups folder, and I can't seem to find anything specific on google.

My web folder is : /home/user/public_html/mydomain.com/
Backups folder is: /home/user/backups/

Some Concerns

  • Would there be any issues gziping while nginx/apache running?
  • Also I have the permission set to 755, is this ok?
  • Do I need to tarball before I gzip it?
  • Will this overwrite a previous gzip?
  • Is there a way to automatically append the date?...That would be great!

I have been manually doing this in Cyberduck ... what a pain!

share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted
  1. It is always smart to stop anything that touches the files you want to backup. If files are changed during the creation of the backup you can not predict the outcome of restoring the backup: it might break data.

  2. Yes.

  3. No, but you will get seperate gzip'd files if you do not.

  4. Yes if the names are the same.

  5. Yes. A filename like backup_date '+%F_%T'.gz will have both date and time as part of your filename beginning with backup_.

share|improve this answer
    
Thanks! much appreciated! –  SkinnyGeek1010 May 15 '11 at 21:12
add comment

tar.bz2 is a better compression tool imho.

tar -jcvf website.tar.bz2 /home/user/public_html/mydomain.com/
share|improve this answer
    
Cool, I will look into .bz2! –  SkinnyGeek1010 May 15 '11 at 20:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.