Backup script

Backup script

Posted by: danno74
Posted on: 2008-04-29 12:22:00

Greetings,

I have created the following script:

#!/bin/bash
suffix=($date +%y%m%d)
cd /home/hnoc/.snapshot/monthly.0/
tar -cf /home/hnoc/backup/archives/healthnetoswegocounty.org.$suffix.tar healthnetoswegocounty.org/

I run it and get the following error:


./hnoc.sh: line 3: cd: /home/hnoc/.snapshot/monthly.0/: No such file or directory
tar: healthnetoswegocounty.org: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors

I have the exact same script for another domain with Dreamhost on another server and it works fine. What's the deal?


Re: Backup script

Posted by: zylox
Posted on: 2008-04-29 15:28:00

Maybe the site is too new to have a monthly backup yet?



Jan

Re: Backup script

Posted by: sXi
Posted on: 2008-04-29 16:43:00

shell in and check if anything is actually inside the .snapshot directory.

All mine have been empty since Blingyfest frown


Re: Backup script

Posted by: danno74
Posted on: 2008-04-30 05:49:00

That was it, no monthly folder. Changed to weekly.0 and it works. Thanks for the suggestion.

Tags: tar cfbackup scriptcd homedreamhostline 3suffixsnapshotstatgreetings