LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-27-2002, 12:59 PM   #1
John_Saunders
Member
 
Registered: Jun 2002
Location: Wilmington, NC
Distribution: Red Hat 7.2
Posts: 47

Rep: Reputation: 15
How Can I Backup My Server?


I have a dedicated server running Red Hat 7.2. I would like to back up all of my folders/files and download them to my local server for a backup copy. I've tried running the two commands below from the root directory while logged in as root in SSH and neither one of them work.

zip 10_27_02.zip -r -9 tar bin boot dev etc home initrd lib mnt opt proc root sbin tmp usr var

---> this came up with:

bash: zip: command not found

tar -cf 10_27_02.tar bin boot dev etc home initrd lib mnt opt proc root sbin tmp usr var

---> this came up with:

tar: dev/log: socket ignored
tar: proc/kcore: File shrank by 32242176 bytes; padding with zeros
tar: proc/2/exe: Cannot readlink: No such file or directory
tar: proc/3/exe: Cannot readlink: No such file or directory
tar: proc/4/exe: Cannot readlink: No such file or directory
tar: proc/5/exe: Cannot readlink: No such file or directory
tar: proc/6/exe: Cannot readlink: No such file or directory
tar: proc/7/exe: Cannot readlink: No such file or directory
tar: proc/8/exe: Cannot readlink: No such file or directory
tar: proc/9/exe: Cannot readlink: No such file or directory
tar: proc/13/exe: Cannot readlink: No such file or directory
tar: proc/74/exe: Cannot readlink: No such file or directory
tar: proc/166/exe: Cannot readlink: No such file or directory
tar: proc/3052/fd/4: Cannot stat: No such file or directory
tar: proc/3055/fd: Cannot savedir: No such file or directory
tar: proc/3055/mem: File removed before we read it
tar: proc/3055/cwd: Cannot readlink: No such file or directory
tar: proc/3055/root: Cannot readlink: No such file or directory
tar: proc/3055/exe: Cannot readlink: No such file or directory
tar: tmp/ssh-XXBT1TFk/agent.15840: socket ignored
tar: tmp/mysql.sock: socket ignored
tar: tmp/ssh-XXa63hg9/agent.1214: socket ignored
tar: tmp/ssh-XXdvhtjG/agent.1138: socket ignored
tar: tmp/ssh-XXOQnLWd/agent.3403: socket ignored
tar: tmp/ssh-XXk1VOLP/agent.1620: socket ignored
tar: tmp/ssh-XXqWs8yO/agent.1586: socket ignored
tar: tmp/ssh-XXgmoMEF/agent.4519: socket ignored
tar: tmp/ssh-XXQoXbea/agent.2206: socket ignored
tar: Error exit delayed from previous errors


Can somebody tell me what I need to do to get the ZIP command to work, or what I need to enter to tar and gzip every folder/file on my server to one file I can download?
 
Old 10-27-2002, 01:18 PM   #2
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
Honestly I'd not even use such one for filesystem backup. When I do a backup and what to have a posibility of ease restore I usually use the dump-tool. Example:

You want to backup all data on hda1 and use a compression level 9 for that (= maximum compression) then you'd do

dump -0 -z9 -f example.dump /dev/hda1

The location of the example.dump should not be on the same partition (example.dump should not be on hda1). It might be helpful at a later state to know about the partitions so maybe do a

df -alh > partitions


At the later state when you want to restore the dump, join the directory where you want to put the filesystem you dumped on (e. g. /var) and type

restore rf example.dump


If you have a RH rescue CD for instance you can boot up with that CD and have the dumps on a FTP-server (username can be anything but password has to be empty) and restore the whole server using FTP ...


I've restored a huge server (COMPLETELY) in 1 hour ... now that safes you some time in case of let's say if your box got hacked and binaries replaced with trojaned versions or something alike


Hope this helps
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
backup server ; network file system / ftp-server ? markus1982 Linux - Security 5 06-06-2007 05:15 PM
Server backup stefan_nicolau Linux - Software 2 06-17-2005 10:05 PM
Backup MX Server dlublink Linux - Networking 5 12-17-2004 07:41 AM
Mounting windows server onto SuSE backup server murungu Linux - General 1 09-20-2004 03:01 PM
Backup Server hrc Linux - General 2 10-17-2003 02:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration