I'm backing up a directory on our server to a clients hard disk. The directory is mounted on the client via nfs and contains subdirectories. The directory is around 1Gb. Sometimes I get a clean copy but sometimes I have missing files. Is it correct to assume that the backup should have the same file size as the original? Any ideas about the missing files and would ftp be a better bet? Thanks, Steve.
On Fri, 2003-01-17 at 14:37, fsanta wrote:
I'm backing up a directory on our server to a clients hard disk. The directory is mounted on the client via nfs and contains subdirectories. The directory is around 1Gb. Sometimes I get a clean copy but sometimes I have missing files. Is it correct to assume that the backup should have the same file size as the original? Any ideas about the missing files and would ftp be a better bet? Thanks, Steve.
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
A method I have used to copy files around uses tar as follows: (cd [source dir];tar cf - ./source)|(cd [dest dir];tar xvf -) This will copy all of the source files along with ownerships and perms, including special files ie. links and device files. -- Ken Schneider Senior UNIX Administrator Network Administrator kschneider@rtsx.com
On Friday 17 January 2003 18:43, Ken Schneider wrote:
On Fri, 2003-01-17 at 14:37, fsanta wrote:
I'm backing up a directory on our server to a clients hard disk. The directory is mounted on the client via nfs and contains subdirectories. The directory is around 1Gb. Sometimes I get a clean copy but sometimes I have missing files. Is it correct to assume that the backup should have the same file size as the original? Any ideas about the missing files and would ftp be a better bet? Thanks, Steve.
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
A method I have used to copy files around uses tar as follows:
(cd [source dir];tar cf - ./source)|(cd [dest dir];tar xvf -)
This will copy all of the source files along with ownerships and perms, including special files ie. links and device files.
Hi. Thanks for the reply. I can't work out the syntax. (Yeah, I know. I've not read enough man pages!) What could the actual syntax be for my setup pressing enter at the end of each command? source dir= /home dest dir= /usr/local/home TIA and sorry to be such a pain. Steve.
On Fri, 2003-01-17 at 16:48, fsanta wrote:
On Friday 17 January 2003 18:43, Ken Schneider wrote:
On Fri, 2003-01-17 at 14:37, fsanta wrote:
I'm backing up a directory on our server to a clients hard disk. The directory is mounted on the client via nfs and contains subdirectories. The directory is around 1Gb. Sometimes I get a clean copy but sometimes I have missing files. Is it correct to assume that the backup should have the same file size as the original? Any ideas about the missing files and would ftp be a better bet? Thanks, Steve.
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
A method I have used to copy files around uses tar as follows:
(cd [source dir];tar cf - ./source)|(cd [dest dir];tar xvf -)
This will copy all of the source files along with ownerships and perms, including special files ie. links and device files.
Hi. Thanks for the reply.
I can't work out the syntax. (Yeah, I know. I've not read enough man pages!) What could the actual syntax be for my setup pressing enter at the end of each command?
source dir= /home dest dir= /usr/local/home
(cd /home;tar cf - ./*)|(cd /usr/local/home; tar xvf -)
TIA and sorry to be such a pain. Steve.
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com -- Ken Schneider Senior UNIX Administrator Network Administrator kschneider@rtsx.com
Ken Schneider
On Fri, 2003-01-17 at 14:37, fsanta wrote:
I'm backing up a directory on our server to a clients hard disk. The directory is mounted on the client via nfs and contains subdirectories. The directory is around 1Gb. Sometimes I get a clean copy but sometimes I have missing files. Is it correct to assume that the backup should have the same file size as the original? Any ideas about the missing files and would ftp be a better bet?
In general, there shouldn't be any missing files but it's better to provide an example of what you actually do.
(cd /home;tar cf - ./*)|(cd /usr/local/home; tar xvf -)
The form above doesn't copy hidden (dot) files in the /home directory. It's OK for /home but in other cases the following form is preferred: # (cd /home; tar cf - .) | (cd /usr/local/home; tar xvf -) -- Alexandr.Malusek@imv.liu.se
On Saturday 18 January 2003 11:15, Alexandr Malusek wrote:
Ken Schneider
writes: On Fri, 2003-01-17 at 14:37, fsanta wrote:
I'm backing up a directory on our server to a clients hard disk. The directory is mounted on the client via nfs and contains subdirectories. The directory is around 1Gb. Sometimes I get a clean copy but sometimes I have missing files. Is it correct to assume that the backup should have the same file size as the original? Any ideas about the missing files and would ftp be a better bet?
In general, there shouldn't be any missing files but it's better to provide an example of what you actually do.
(cd /home;tar cf - ./*)|(cd /usr/local/home; tar xvf -)
The form above doesn't copy hidden (dot) files in the /home directory. It's OK for /home but in other cases the following form is preferred:
# (cd /home; tar cf - .) | (cd /usr/local/home; tar xvf -)
In fact we use KDE so any backup shouild include these files. My main problem is that using tar overwrites already existing files and I can't find a way to do incremental backups. rsync does this but it's so easy that I feel I must be missing something. Confused, Steve.
fsanta
In fact we use KDE so any backup shouild include these files. My main problem is that using tar overwrites already existing files and I can't find a way to do incremental backups.
People can't help you because they don't understand what you want to do. Specify the task first (what the backup should do, how the backup files should be stored, ...) and a software and method will be recommended then. -- Alexandr.Malusek@imv.liu.se
On Saturday 18 January 2003 15:17, Alexandr Malusek wrote:
fsanta
writes: In fact we use KDE so any backup shouild include these files. My main problem is that using tar overwrites already existing files and I can't find a way to do incremental backups.
People can't help you because they don't understand what you want to do. Specify the task first (what the backup should do, how the backup files should be stored, ...) and a software and method will be recommended then.
Sorry it's not very coherent. I run a school network under NIS. Say for whatever reason I have to reinstall the system from scratch. The only data I care about is in /home. I want to be able to copy back the /home directory and all user settings so that normal work can be resumed. Users directories under /home are automounted via NIS. The only computer to have a 'real' copy is the server. The backup must copy *everything* in the /home directory. The backup should be stored on a client in the network.
fsanta
Sorry it's not very coherent. I run a school network under NIS. Say for whatever reason I have to reinstall the system from scratch. The only data I care about is in /home. I want to be able to copy back the /home directory and all user settings so that normal work can be resumed. Users directories under /home are automounted via NIS. The only computer to have a 'real' copy is the server. The backup must copy *everything* in the /home directory. The backup should be stored on a client in the network.
OK. Then you have to decide the backup strategy: 1. The type of backup: - full backup only - incremental backup - differential backup - a mixture of the above 2. The frequency of the backup. The decision depends on many factors, mainly: (1) the ratio between the amount of data you want to back up and the capacity of the storage space, (2) administrators' expertise, (3) the amount of money. You can buy an expensive software where you simply select the backup strategy in a GUI environment or you can write a shell script which will do it without paying anything. I don't recommend a complicated backup strategy (for instance a mixture of differential and incremental backups) if the administrators' knowledge is not good enough. A recipe how to restore the data should be in a folder but they may not understand it anyway. The backup is not related to NIS or NFS. -- Alexandr.Malusek@imv.liu.se
On Saturday 18 January 2003 17:02, Alexandr Malusek wrote:
fsanta
writes: Sorry it's not very coherent. I run a school network under NIS. Say for whatever reason I have to reinstall the system from scratch. The only data I care about is in /home. I want to be able to copy back the /home directory and all user settings so that normal work can be resumed. Users directories under /home are automounted via NIS. The only computer to have a 'real' copy is the server. The backup must copy *everything* in the /home directory. The backup should be stored on a client in the network.
OK. Then you have to decide the backup strategy:
1. The type of backup: - full backup only - incremental backup - differential backup - a mixture of the above
2. The frequency of the backup.
The decision depends on many factors, mainly: (1) the ratio between the amount of data you want to back up and the capacity of the storage space, (2) administrators' expertise, (3) the amount of money.
You can buy an expensive software where you simply select the backup strategy in a GUI environment or you can write a shell script which will do it without paying anything.
I don't recommend a complicated backup strategy (for instance a mixture of differential and incremental backups) if the administrators' knowledge is not good enough. A recipe how to restore the data should be in a folder but they may not understand it anyway.
The backup is not related to NIS or NFS.
I think I'll go for incremental daily backup via rsync, dump that to dvd once a month, clear out the backup directory and start again the next month with a new rsync'd copy. How does that sound. Or am I way off? Thanks for your patience, Steve.
fsanta
I think I'll go for incremental daily backup via rsync, dump that to dvd once a month, clear out the backup directory and start again the next month with a new rsync'd copy.
tar, cpio, dump, ... can also do it. If you prefer rsync then use it. But cp is not the right tool. If you use ACL or special ext2 attributes then make sure the backup handles them too. -- Alexandr.Malusek@imv.liu.se
On 18 Jan 2003 18:53:27 +0100
Alexandr Malusek
fsanta
writes: I think I'll go for incremental daily backup via rsync, dump that to dvd once a month, clear out the backup directory and start again the next month with a new rsync'd copy.
tar, cpio, dump, ... can also do it. If you prefer rsync then use it. But cp is not the right tool.
Have you heard of dar? http://dar.linux.free.fr It does compressed backups, and is very versatile, such as reading from pipes. It also lets you specify the size of the compressed backup volumes. -- use Perl; #powerful programmable prestidigitation
zentara
tar, cpio, dump, ... can also do it. If you prefer rsync then use it. But cp is not the right tool.
Have you heard of dar?
It may be a good program but, at this stage, a reference to a HowTo document describing an implementation of the remote backup via a cron job would be more useful than a list of additional backup programs. It's easy and straightforward for an advanced administrator but difficult for someone without the knowledge. -- Alexandr.Malusek@imv.liu.se
tar, cpio, dump, ... can also do it. If you prefer rsync then use it. But cp is not the right tool.
On http://freshmeat.net: rdiff-backup 0.10.2 by Ben Escoto - Sunday, January 19th 2003 03:17 PST About: rdiff-backup backs up one directory to another. The target directory ends up a copy of the source directory, but extra reverse diffs are stored in a special directory so you can still recover files lost some time ago. The idea is to combine the best features of a mirror and an incremental backup. rdiff-backup can also operate in a bandwidth- efficient manner over a pipe, like rsync. Thus you can use rdiff-backup and ssh to securely back up to a remote location, and only the differences will be transmitted. It can also handle symlinks, device files, permissions, ownership, etc., so it can be used on the entire file system. -- use Perl; #powerful programmable prestidigitation
On Fri, 17 Jan 2003 19:37:24 +0000
fsanta
I'm backing up a directory on our server to a clients hard disk. The directory is mounted on the client via nfs and contains subdirectories. The directory is around 1Gb. Sometimes I get a clean copy but sometimes I have missing files. Is it correct to assume that the backup should have the same file size as the original? Any ideas about the missing files and would ftp be a better bet? You might want to use rsync. Rsync is really designed as a mirror, but it also won't copy files that are already there. It also has a logging facility. rsync -auz source target Copy source to the target, and create the source directory in the target. rsync -auz source/ target Copy the contents of source.
fsanta wrote:
I'm backing up a directory on our server to a clients hard disk. The directory is mounted on the client via nfs and contains subdirectories. The directory is around 1Gb. Sometimes I get a clean copy but sometimes I have missing files. Is it correct to assume that the backup should have the same file size as the original? Any ideas about the missing files and would ftp be a better bet? Thanks, Steve.
Unless there is some problem with nfs not seeing .files, your copy command should work if done like cd / cp -a home /usr/local/ No need to get fancy... Mark
try a $ tar -cvf /whereIwantmybackup/myfilename.tar /nfsmounted/directory Mark Hounschell wrote:
fsanta wrote:
I'm backing up a directory on our server to a clients hard disk. The directory is mounted on the client via nfs and contains subdirectories. The directory is around 1Gb. Sometimes I get a clean copy but sometimes I have missing files. Is it correct to assume that the backup should have the same file size as the original? Any ideas about the missing files and would ftp be a better bet? Thanks, Steve.
Unless there is some problem with nfs not seeing .files, your copy command should work if done like
cd / cp -a home /usr/local/
No need to get fancy...
Mark
-- ------------------------------------------------------------------------------- Disparate Needs ------ One Solution --- INETBOX Ampersand Info-Tech Pvt.Ltd phone +91 (0)11 / 2693 3118 New Delhi -- Munich fax +91 (0)11 / 2632 2980 http://www.aitpl.com mobile +91 (0)98101/57881 Linux - Solaris - Windows - Software Application Partners ------------------------------------------------------------------------------- The information contained in this message (including any attachments)is confidential and may be legally privileged. If you are not the intended recipient, please delete it from your system immediately - any disclosure, copying or distribution thereof or any action taken or omitted to be taken in reliance thereon is prohibited and may be unlawful. AITPL makes no warranty as to the accuracy or completeness of any information contained in this message and hereby excludes any liability of any kind for the information contained herein or for the transmission, reception, storage or use of such information in any way whatsoever. Any opinions expressed in this message are those of the author and do not necessarily reflect the opinions of AITPL. -------------------------------------------------------------------------------
participants (7)
-
Alexandr Malusek
-
fsanta
-
Jerry Feldman
-
Ken Schneider
-
Mark Hounschell
-
Vishal Khanna
-
zentara