Backup script


#1

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?


#2

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

Jan

Promo-Code: [color=#CC0000]SAVEMONEY97[/color] - Save [color=#CC0000]$50[/color] on your first year of hosting.
Get more promo codes here


#3

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

All mine have been empty since Blingyfest :frowning:

Maximum Cash Discount on any plan with MAXCASH


#4

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