Automatic backups help

I want to backup my files and folders and found DH wiki( very helpful. I created backups and backups/archives directories and under backups I uploaded the script I saved in notepad using UTF-8 format and save all files which has the following codes:

suffix=$(date %y%m%d)
tar -cf /home/username/backups/archives/$suffix.tar /home/username/.snapshot/nightly.0/

And I tested using PuTTY, I started running commands like

cd backups which was good.

But when I gave ./ it says

: 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. 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.

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.

Notepad’s most likely the culprit. Windows editors tend to add extra hidden characters. Use pico or nano while logged in with PuTTY.


Ya, probably the easiet thing to do at this point is to open up each of your scripts in nano, edit any weirdness out and save. To do this give the command
nano -w

when you’re done press ctrl and o at the same time to save and then ctrl-x to exit. See if the script will now run.

I’ll have to work on making those directions again. shakes his head

–Matttail - personal website

Ok, I downloaded nano-1.2.3.tar.gz and wanted to install in my computer so that I can use the editor. But I’m clueless about how to install the editor in my system though I can see ‘How to compile and install nano’ at

My OS is Windows XP Home service pack 2 enabled.

Thanks for your help again.

Edit 1:
I tried running the following command in PuTTY but it says no says no such files or directory, the tar file itself was not called in.

tar zxvf nano-1.2.5.tar.gz
cd nano-1.2.5
make install

sorry. nano should be run from putty and it’s already installed. Nano an pico are both command line text editors. Like notepad, but running on your DH server. it should go something like this:

launch putty, log in.
cd backups
nano -w

that will bring up the file called in your backups directory. Now use the editor to make sure there’s nothing wonky with your script and save it. you can use the arrow keys to move around, and such as you would normally. then fress crtl-o to save and crtl-x to exit as I mentioned above. After you’ve done this try running the scripts again as mentioned in the wiki to test and see if it’s working now.

–Matttail - personal website

Use a Hex editor to remove the extra  characters generated by notepad.

A free Hex editor