matfish Posted January 21, 2009 Share Posted January 21, 2009 Hi there, Is there a way of .zipping or .taring up /srv/www/htdocs in a .sh script? I can then add it to a cron on a weekly basis as a backup routine? I've tried a few but if they hit a file which is CHMODed to 0 then it stops. Many thanks Quote Link to comment https://forums.phpfreaks.com/topic/141740-web-backup-cron/ Share on other sites More sharing options...
trq Posted January 21, 2009 Share Posted January 21, 2009 I've tried a few but if they hit a file which is CHMODed to 0 then it stops. Files cannot be chmod'd to 0. Do you mean files that are owned by 0 (root)? Show us what you have. Quote Link to comment https://forums.phpfreaks.com/topic/141740-web-backup-cron/#findComment-742059 Share on other sites More sharing options...
steviewdr Posted January 21, 2009 Share Posted January 21, 2009 You can chmod a file/folder 000. matfish, your best bet, would be to do a chmod -R 644 on the files before backing up. There is no special backup method. Just a .sh and cron. -steve Quote Link to comment https://forums.phpfreaks.com/topic/141740-web-backup-cron/#findComment-742135 Share on other sites More sharing options...
trq Posted January 21, 2009 Share Posted January 21, 2009 You can chmod a file/folder 000 Hmm. And what exactly would be the point then? I mean you couldn't do anything with it. Quote Link to comment https://forums.phpfreaks.com/topic/141740-web-backup-cron/#findComment-742139 Share on other sites More sharing options...
steviewdr Posted January 21, 2009 Share Posted January 21, 2009 I dunno off hand where chmod 000 would be useful. It might be useful if you wanted to protect a file from accidental deletion. I just know it can be done. -steve Quote Link to comment https://forums.phpfreaks.com/topic/141740-web-backup-cron/#findComment-742149 Share on other sites More sharing options...
corbin Posted January 21, 2009 Share Posted January 21, 2009 You could always just run the backup script as root. Or you could make a user and give it free reign to /srv/www/htdocs/. Quote Link to comment https://forums.phpfreaks.com/topic/141740-web-backup-cron/#findComment-742688 Share on other sites More sharing options...
matfish Posted January 22, 2009 Author Share Posted January 22, 2009 Thanks all. There were only a few files chmodded to 0 - this was to stop users viewing these old pages but I didn't want to delete them. I've backed them up so the site is chmod 0 free and the scripts work fine now. Thanks for your help Quote Link to comment https://forums.phpfreaks.com/topic/141740-web-backup-cron/#findComment-743189 Share on other sites More sharing options...
tomfmason Posted January 22, 2009 Share Posted January 22, 2009 I like duplicity for my backups. Duplicity backs directories by producing encrypted tar-format volumes and uploading them to a remote or local file server. Because duplicity uses librsync, the incremental archives are space efficient and only record the parts of files that have changed since the last backup. Because duplicity uses GnuPG to encrypt and/or sign these archives, they will be safe from spying and/or modification by the server. Quote Link to comment https://forums.phpfreaks.com/topic/141740-web-backup-cron/#findComment-743202 Share on other sites More sharing options...
corbin Posted January 22, 2009 Share Posted January 22, 2009 I like duplicity for my backups. Duplicity backs directories by producing encrypted tar-format volumes and uploading them to a remote or local file server. Because duplicity uses librsync, the incremental archives are space efficient and only record the parts of files that have changed since the last backup. Because duplicity uses GnuPG to encrypt and/or sign these archives, they will be safe from spying and/or modification by the server. Oooo I like it. Next time I have the need for something like that, I shall use it. Quote Link to comment https://forums.phpfreaks.com/topic/141740-web-backup-cron/#findComment-743771 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.