October 29th in Linux/Unix by pbu .

How to do backups with Network Attached Storage (NAS) in Linux

Network Attached Storage (NAS) is the cheap and easy way of storing your server backup files. Most often i used to do a cpanel backup files every week and i always wanted to store these files outside by server. Should my server crash, i can easily retrieve backup through FTP and restore the whole site.

Although NAS is not fully fault tolerant, its a very primitive form of backup and the one disadvantage is should the hosting providers network go down you wont be able to move your backup to another host. You have to wait until your host network is up and running. I would suggest evault which is one of the cheap and reliable fault tolerant backup distributed over different locations and servers. If you have a dedicated server then NAS should cost about $5/mon and $10/mon for evault.

Here i will demonstrate how to store and retrieve files with Network Attached Storage (NAS) from commandline.

Step: 1
Get NAS ip address with user name and password from your hosting provider.

Step 2: If you have any firewalls(APF or CSF firewall) running, you have to unblock the following TCP/UDP ports 137,138,139,445

Step 3:
Connect through FTP and store files. You just need to know the basic knowledge of ftp commands from linux commandline.

ftp <11.22.33.44>
Username:
Password:

Then,

(i) switch off prompt

ftp> prompt
Prompt off

(ii) Switch to binary mode

ftp> binary
BINARY mode ON

(iii) Store backup files using put

Then transfer files to remote NAS with put

put source-file [remote-destination]
put /mybackup.tar.gz /backups/newfile.tar.gz

(iv) Retrieve backup files using get
Similarly to retrieve backup file from remote use get

get remote-file [ local-file ]

Note: [remote-destination] is optional

(iv) To FTP transfer (store/retrieve) Multiple files at once use mput or mget with asterisks.


mput backup* /backups
mget backup* /backups

(vi) To list remotely stored files in FTP use nlist

nlist /backups

Good luck!

With Backups YOU can SLEEP with Peace of MIND

Similar Posts:

Share and Enjoy:
  • del.icio.us
  • digg
  • StumbleUpon
  • Technorati
  • DZone
  • Facebook
  • FriendFeed
  • Reddit
  • RSS
  • Twitter

2 Comments

Leave A Comment.