Re: copying just / (not /tmp, /usr, etc) (rsync -x failed)
On Wed, Dec 05, 2007 at 10:10:20AM -0700, James Harrison wrote: On Wed, 2007-12-05 at 10:41 -0500, Jerry McAllister wrote: On Tue, Dec 04, 2007 at 05:38:20PM -0700, Steve Franks wrote: I have / on one slice, and [usr,tmp,var] on others. I want to move just / to a new disk, which seemed to be what rsync -x (do not cross filesystems) was intended for. It failed, however, as df shows 20k blocks in /, and rsync filled up the target slice with 50k blocks, so obviously it blew right past the 'end' of / - did I miss something? Is there no other way except to umount [tmp,usr,var]? I would use dump/restore. Build the filesystem in the new disk partition with fdisk, bsdlabel and newfs as needed. Then mount the new partition somewhere - example: mkdir /newpart mount /dev/ad1s1a /newpart (presuming new disk is ad1, slice is 1, partition is a) Doesn't hurt to do an fsck on it here before writing to it, but it probably isn't really needed. Then, run the dump/restore cd /newpart dump 0af - / | restore -rf - This will get all of / as you want. The other mountpoints for /tmp, /usr and /var will be copied, but not the contents of those filesystems. You probably want that. jerry Thanks, Steve Everyone's recommending dump/restore for copying file systems, and there's something that I've never really been clear on. The advantage of dump/restore is that it will handle all file situations correctly. Most of the other copy schemes miss on something, such as hard links. It is easy to use. The nice thing about rsync is that it's network aware. Can dump dump a file system across a network? Rsync is OK, especially if you want to set up something for a regular scheduled copy/update, but may be too much for making a single copy. jerry James ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: copying just / (not /tmp, /usr, etc) (rsync -x failed)
James Harrison wrote: On Wed, 2007-12-05 at 10:41 -0500, Jerry McAllister wrote: On Tue, Dec 04, 2007 at 05:38:20PM -0700, Steve Franks wrote: I have / on one slice, and [usr,tmp,var] on others. I want to move just / to a new disk, which seemed to be what rsync -x (do not cross filesystems) was intended for. It failed, however, as df shows 20k blocks in /, and rsync filled up the target slice with 50k blocks, so obviously it blew right past the 'end' of / - did I miss something? Is there no other way except to umount [tmp,usr,var]? I would use dump/restore. Build the filesystem in the new disk partition with fdisk, bsdlabel and newfs as needed. Then mount the new partition somewhere - example: mkdir /newpart mount /dev/ad1s1a /newpart (presuming new disk is ad1, slice is 1, partition is a) Doesn't hurt to do an fsck on it here before writing to it, but it probably isn't really needed. Then, run the dump/restore cd /newpart dump 0af - / | restore -rf - This will get all of / as you want. The other mountpoints for /tmp, /usr and /var will be copied, but not the contents of those filesystems. You probably want that. jerry Thanks, Steve Everyone's recommending dump/restore for copying file systems, and there's something that I've never really been clear on. The nice thing about rsync is that it's network aware. Can dump dump a file system across a network? James ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] Hi, If you want to perform network backups, you should consider using a network aware backup solution such as Bacula or Amanda. Konstantinos ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: copying just / (not /tmp, /usr, etc) (rsync -x failed)
Konstantinos Pachnis wrote: James Harrison wrote: On Wed, 2007-12-05 at 10:41 -0500, Jerry McAllister wrote: On Tue, Dec 04, 2007 at 05:38:20PM -0700, Steve Franks wrote: I have / on one slice, and [usr,tmp,var] on others. I want to move just / to a new disk, which seemed to be what rsync -x (do not cross filesystems) was intended for. It failed, however, as df shows 20k blocks in /, and rsync filled up the target slice with 50k blocks, so obviously it blew right past the 'end' of / - did I miss something? Is there no other way except to umount [tmp,usr,var]? I would use dump/restore. Build the filesystem in the new disk partition with fdisk, bsdlabel and newfs as needed. Then mount the new partition somewhere - example: mkdir /newpart mount /dev/ad1s1a /newpart (presuming new disk is ad1, slice is 1, partition is a) Doesn't hurt to do an fsck on it here before writing to it, but it probably isn't really needed. Then, run the dump/restore cd /newpart dump 0af - / | restore -rf - This will get all of / as you want. The other mountpoints for /tmp, /usr and /var will be copied, but not the contents of those filesystems. You probably want that. jerry Thanks, Steve Everyone's recommending dump/restore for copying file systems, and there's something that I've never really been clear on. The nice thing about rsync is that it's network aware. Can dump dump a file system across a network? Not following the rest of the thread so sorry if a duplicate answer. you can easily dump to a file across a network if you have ssh configured. something like dump -f - /dev/ad1s1 | ssh [EMAIL PROTECTED] cat /path/to/dumpfile.ad1s1.oldhost Dump can also talk to remote tape devices using rmt apparently but I've never tried this. Vince James ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] Hi, If you want to perform network backups, you should consider using a network aware backup solution such as Bacula or Amanda. Konstantinos ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: copying just / (not /tmp, /usr, etc) (rsync -x failed)
On Dec 6, 2007, at 8:48 AM, Konstantinos Pachnis wrote: James Harrison wrote: On Wed, 2007-12-05 at 10:41 -0500, Jerry McAllister wrote: On Tue, Dec 04, 2007 at 05:38:20PM -0700, Steve Franks wrote: I have / on one slice, and [usr,tmp,var] on others. I want to move just / to a new disk, which seemed to be what rsync -x (do not cross filesystems) was intended for. It failed, however, as df shows 20k blocks in /, and rsync filled up the target slice with 50k blocks, so obviously it blew right past the 'end' of / - did I miss something? Is there no other way except to umount [tmp,usr,var]? I would use dump/restore. Build the filesystem in the new disk partition with fdisk, bsdlabel and newfs as needed. Then mount the new partition somewhere - example: mkdir /newpart mount /dev/ad1s1a /newpart (presuming new disk is ad1, slice is 1, partition is a) Doesn't hurt to do an fsck on it here before writing to it, but it probably isn't really needed. Then, run the dump/restore cd /newpart dump 0af - / | restore -rf - This will get all of / as you want. The other mountpoints for / tmp, /usr and /var will be copied, but not the contents of those filesystems. You probably want that. jerry Thanks, Steve Everyone's recommending dump/restore for copying file systems, and there's something that I've never really been clear on. The nice thing about rsync is that it's network aware. Can dump dump a file system across a network? James ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] Hi, If you want to perform network backups, you should consider using a network aware backup solution such as Bacula or Amanda. Konstantinos We do this little trick when we're moving an OS to a new system, and don't want to reinstall: https://www.secure-computing.net/wiki/index.php/Dump_Over_SSH HTH - Eric F Crist Secure Computing Networks ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: copying just / (not /tmp, /usr, etc) (rsync -x failed)
On Thu, Dec 06, 2007 at 04:48:40PM +0200, Konstantinos Pachnis wrote: James Harrison wrote: On Wed, 2007-12-05 at 10:41 -0500, Jerry McAllister wrote: On Tue, Dec 04, 2007 at 05:38:20PM -0700, Steve Franks wrote: I have / on one slice, and [usr,tmp,var] on others. I want to move just / to a new disk, which seemed to be what rsync -x (do not cross filesystems) was intended for. It failed, however, as df shows 20k ... I would use dump/restore. ... Then, run the dump/restore cd /newpart dump 0af - / | restore -rf - This will get all of / as you want. The other mountpoints for /tmp, /usr and /var will be copied, but not the contents of those filesystems. You probably want that. jerry Thanks, Steve Everyone's recommending dump/restore for copying file systems, and there's something that I've never really been clear on. The nice thing about rsync is that it's network aware. Can dump dump a file system across a network? James Hi, If you want to perform network backups, you should consider using a network aware backup solution such as Bacula or Amanda. He said he just wants to make a copy of the file system on to another disk. Getting a whole new system set up is overkill for that. Anyway, we were never happy with Amanda. Haven't used Bacula. jerry Konstantinos ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: copying just / (not /tmp, /usr, etc) (rsync -x failed)
On Tue, Dec 04, 2007 at 05:38:20PM -0700, Steve Franks wrote: I have / on one slice, and [usr,tmp,var] on others. I want to move just / to a new disk, which seemed to be what rsync -x (do not cross filesystems) was intended for. It failed, however, as df shows 20k blocks in /, and rsync filled up the target slice with 50k blocks, so obviously it blew right past the 'end' of / - did I miss something? Is there no other way except to umount [tmp,usr,var]? I would use dump/restore. Build the filesystem in the new disk partition with fdisk, bsdlabel and newfs as needed. Then mount the new partition somewhere - example: mkdir /newpart mount /dev/ad1s1a /newpart (presuming new disk is ad1, slice is 1, partition is a) Doesn't hurt to do an fsck on it here before writing to it, but it probably isn't really needed. Then, run the dump/restore cd /newpart dump 0af - / | restore -rf - This will get all of / as you want. The other mountpoints for /tmp, /usr and /var will be copied, but not the contents of those filesystems. You probably want that. jerry Thanks, Steve ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: copying just / (not /tmp, /usr, etc) (rsync -x failed)
On Wed, Dec 05, 2007 at 09:46:53AM -0700, Steve Franks wrote: dump 0af - / | restore -rf - Jerry - thanks a million. I was pouring over the dump/restore and 'backup basics' in the handbook, and couldn't for the life of me figure out how to get it to go to a filesystem instead of a tape/specialdevice/file. Figured the only way was to use rsync. You just name the file using the -f parameter. In this case, use the -f, but specify the file as - and it uses STDOUT/STDIN. By the way, dump/restore will work over the net; just pipe it via ssh. When I have done that, it has seemed to be somewhat of a resource hog while it was going. But it worked. jerry Steve ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: copying just / (not /tmp, /usr, etc) (rsync -x failed)
On Wed, 2007-12-05 at 10:41 -0500, Jerry McAllister wrote: On Tue, Dec 04, 2007 at 05:38:20PM -0700, Steve Franks wrote: I have / on one slice, and [usr,tmp,var] on others. I want to move just / to a new disk, which seemed to be what rsync -x (do not cross filesystems) was intended for. It failed, however, as df shows 20k blocks in /, and rsync filled up the target slice with 50k blocks, so obviously it blew right past the 'end' of / - did I miss something? Is there no other way except to umount [tmp,usr,var]? I would use dump/restore. Build the filesystem in the new disk partition with fdisk, bsdlabel and newfs as needed. Then mount the new partition somewhere - example: mkdir /newpart mount /dev/ad1s1a /newpart (presuming new disk is ad1, slice is 1, partition is a) Doesn't hurt to do an fsck on it here before writing to it, but it probably isn't really needed. Then, run the dump/restore cd /newpart dump 0af - / | restore -rf - This will get all of / as you want. The other mountpoints for /tmp, /usr and /var will be copied, but not the contents of those filesystems. You probably want that. jerry Thanks, Steve Everyone's recommending dump/restore for copying file systems, and there's something that I've never really been clear on. The nice thing about rsync is that it's network aware. Can dump dump a file system across a network? James ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: copying just / (not /tmp, /usr, etc) (rsync -x failed)
James Harrison wrote: Everyone's recommending dump/restore for copying file systems, and there's something that I've never really been clear on. The nice thing about rsync is that it's network aware. Can dump dump a file system across a network? You could probably use ssh as a transport. -- Philip M. Gollucci ([EMAIL PROTECTED]) o:703.549.2050x206 Senior System Admin - Riderway, Inc. http://riderway.com / http://ridecharge.com 1024D/EC88A0BF 0DE5 C55C 6BF3 B235 2DAB B89E 1324 9B4F EC88 A0BF Work like you don't need the money, love like you'll never get hurt, and dance like nobody's watching. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: copying just / (not /tmp, /usr, etc) (rsync -x failed)
Steve Franks [EMAIL PROTECTED] writes: I have / on one slice, and [usr,tmp,var] on others. I want to move just / to a new disk, which seemed to be what rsync -x (do not cross filesystems) was intended for. It failed, however, as df shows 20k blocks in /, and rsync filled up the target slice with 50k blocks, so obviously it blew right past the 'end' of / - did I miss something? Is there no other way except to umount [tmp,usr,var]? You missed lots of ways. The canonical method is dump(8)/restore(8). There are many other methods as well. For rsync, what you missed was probably the -H option (i.e., you didn't copy from other filesystems, you just ended up with separate copies of files that were hard linked on the original). Even with rsync, though, you won't get an exact copy. I'd recommend dump for copying filesystems; that's what it's for. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
copying just / (not /tmp, /usr, etc) (rsync -x failed)
I have / on one slice, and [usr,tmp,var] on others. I want to move just / to a new disk, which seemed to be what rsync -x (do not cross filesystems) was intended for. It failed, however, as df shows 20k blocks in /, and rsync filled up the target slice with 50k blocks, so obviously it blew right past the 'end' of / - did I miss something? Is there no other way except to umount [tmp,usr,var]? Thanks, Steve ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: copying just / (not /tmp, /usr, etc) (rsync -x failed)
On Dec 5, 2007 12:38 AM, Steve Franks [EMAIL PROTECTED] wrote: I have / on one slice, and [usr,tmp,var] on others. I want to move just / to a new disk, which seemed to be what rsync -x (do not cross filesystems) was intended for. It failed, however, as df shows 20k blocks in /, and rsync filled up the target slice with 50k blocks, so obviously it blew right past the 'end' of / - did I miss something? Is there no other way except to umount [tmp,usr,var]? try: dd if=/dev/${the / slice} of=/dev/${the new / slice} bs=1m or just go to single user mode umount /tmp /usr /var then copy it.. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]