Automatic backups help
Posted by: khona
Posted on: 2006-07-12 12:23:00
I want to backup my files and folders and found DH wiki(http://wiki.dreamhost.com/index.php/Automatic_Backup) very helpful. I created backups and backups/archives directories and under backups I uploaded the domain.sh script I saved in notepad using UTF-8 format and save all files which has the following codes:
#!/bin/bash
suffix=$(date %y%m%d)
tar -cf /home/username/backups/archives/domain.com.$suffix.tar /home/username/.snapshot/nightly.0/domain.com
And I tested using PuTTY, I started running commands like
cd backups which was good.
But when I gave ./domain.sh it says
./domain.sh
: No such file or directoryne 1: #!/bin/bash
tar: Removing leading `/' from member names
Following the guide I put my real domain instead of domain mentioned above. domain.com and username I used my own as per the guide. Still I'm getting the error.
Once I set up the above correctly I will add cronjobs task as well.
Please help me. Thank you.
EDIT 1:
I went inside the backups/archives after commanding from PuTTY and found that tar file is there. domain.060712.tar but when I tried to download using Filezilla FTP I cannot download, it says
domain.060712 no such files or directory. YOu can see the extension is missing too.
Edited by khona on 07/12/06 12:56 PM (server time).