Thanks. I have used cpio for extracting Oracle patch sets, but never used it going the other direction. Would I just specify /dev/hda3? Thanks, Greg W -----Original Message----- From: Simon Oliver [mailto:s.oliver@umist.ac.uk] Sent: Wednesday, July 07, 2004 6:41 AM To: 'Greg Wallace' Subject: RE: [SLE] Backups cpio expexts a list of files - the usual way to generate the list is to use find: find / -print | cpio -o -v -H crc > file_or_device see man find and man cpio for more details on these commands, for example, you might want to exclude certain paths such as /tmp: find / -path /tmp -prune -o -print or restrict the backup to regular files find / -type f -print -- Simon Oliver
-----Original Message----- From: Greg Wallace [mailto:jgregw@acsalaska.net] Sent: 07 July 2004 13:37 To: 'Simon Oliver' Subject: RE: [SLE] Backups
Thanks for the info. Can you do something like cpio *, meaning cpio everything on the machine?
Thanks, Greg W
-----Original Message----- From: Simon Oliver [mailto:s.oliver@umist.ac.uk] Sent: Wednesday, July 07, 2004 2:10 AM To: 'Greg Wallace' Cc: suse-linux-e@suse.com Subject: RE: [SLE] Backups
How about cpio if you want an alternative to tar.
Actually ghost has two image options, one is an archive (like tar or cpio) the other is byte image. Under linux use dd to archive a byte copy.
Finally, some Linux filesystems have dump/restore command, for example ext2/3 has dump and XFS has xfsdump.
Regards
-- Simon Oliver
Greg Wallace wrote:
Thanks. I have used cpio for extracting Oracle patch sets, but never used it going the other direction. Would I just specify /dev/hda3?
Assuming /dev/hda3 is mounted on /usr and you only want to archive the data from that partition then specify the -mount option: find /usr -mount -print | cpio -o -v -H crc > file_or_device But if you want to include any data from other mounted filesystems, say /dev/hda4 is mounted on /usr/local, then omit the -mount option: find /usr -print | cpio -o -v -H crc > file_or_device Of course you can pipe the results of cpio through gzip. Another option is to use mkisofs and burn direct to CD / DVD - this will result in a browseable CD image: mkisofs -R -J /usr | cdrecord -v - However, there are limitations on the depth and length of path names so be careful! Another option is to create an archive and then burn that to CD / DVD, but this requires an intermediate file: mkisofs -R -J /tmp/archive.cpio.gz | cdrecord -v - Using an archiver like tar, cpio, afio, etc is usually more efficient (in terms of storage) than dd and is more flexible than dd because it allows you to restore selected paths. With dd you get an exact copy of the filesystem (including all the free space) and you must restore the complete filesystem. HIH -- Simon Oliver
Thanks for the info. Greg -----Original Message----- From: Simon Oliver [mailto:s.oliver@umist.ac.uk] Sent: Thursday, July 08, 2004 1:14 AM To: 'Greg Wallace' Cc: suse-linux-e@suse.com Subject: RE: [SLE] Backups Greg Wallace wrote:
Thanks. I have used cpio for extracting Oracle patch sets, but never used it going the other direction. Would I just specify /dev/hda3?
Assuming /dev/hda3 is mounted on /usr and you only want to archive the data from that partition then specify the -mount option: find /usr -mount -print | cpio -o -v -H crc > file_or_device But if you want to include any data from other mounted filesystems, say /dev/hda4 is mounted on /usr/local, then omit the -mount option: find /usr -print | cpio -o -v -H crc > file_or_device Of course you can pipe the results of cpio through gzip. Another option is to use mkisofs and burn direct to CD / DVD - this will result in a browseable CD image: mkisofs -R -J /usr | cdrecord -v - However, there are limitations on the depth and length of path names so be careful! Another option is to create an archive and then burn that to CD / DVD, but this requires an intermediate file: mkisofs -R -J /tmp/archive.cpio.gz | cdrecord -v - Using an archiver like tar, cpio, afio, etc is usually more efficient (in terms of storage) than dd and is more flexible than dd because it allows you to restore selected paths. With dd you get an exact copy of the filesystem (including all the free space) and you must restore the complete filesystem. HIH -- Simon Oliver
Thanks for the info. Greg -----Original Message----- From: Simon Oliver [mailto:s.oliver@umist.ac.uk] Sent: Thursday, July 08, 2004 1:14 AM To: 'Greg Wallace' Cc: suse-linux-e@suse.com Subject: RE: [SLE] Backups Greg Wallace wrote:
Thanks. I have used cpio for extracting Oracle patch sets, but never used it going the other direction. Would I just specify /dev/hda3?
Assuming /dev/hda3 is mounted on /usr and you only want to archive the data from that partition then specify the -mount option: find /usr -mount -print | cpio -o -v -H crc > file_or_device But if you want to include any data from other mounted filesystems, say /dev/hda4 is mounted on /usr/local, then omit the -mount option: find /usr -print | cpio -o -v -H crc > file_or_device Of course you can pipe the results of cpio through gzip. Another option is to use mkisofs and burn direct to CD / DVD - this will result in a browseable CD image: mkisofs -R -J /usr | cdrecord -v - However, there are limitations on the depth and length of path names so be careful! Another option is to create an archive and then burn that to CD / DVD, but this requires an intermediate file: mkisofs -R -J /tmp/archive.cpio.gz | cdrecord -v - Using an archiver like tar, cpio, afio, etc is usually more efficient (in terms of storage) than dd and is more flexible than dd because it allows you to restore selected paths. With dd you get an exact copy of the filesystem (including all the free space) and you must restore the complete filesystem. HIH -- Simon Oliver -- 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
participants (2)
-
Greg Wallace
-
Simon Oliver