vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi all, hope you can help with my backup doubts. 1) I work with a Linux desktop box and a dual Win/Linux laptop. I just bought a 160 Gb portable disk to use as backup and to keep the Linux installations of my two machines reasonably in sync. I created three partitions: NTFS 60 Gb: I use to backup the Win part with Acronis True Image ext3 80 Gb : linux backup FAT32 10 Gb: "swap" area for things I want to access with Win and Linux. Is this a good solution? 2) A trip is coming up and I don't have time to look into complex backup solutions for the Linux part. I need to copy about 40 Gb of data from a hard disk in my desktop box (Suse 10.0) to an external portable disk. Should I just do cp -rp * or is there a better/faster/ safer way? I plan to copy /home, /tmp, and a /rpm directory with a bunch of rpms. Any other things one normally backs up? 3) For future reference, what is a good way to keep the two Linux boxes in sync? (they are different processors so a perfect disk copy won't work). Thanks a lot. |
| |||
| eric wrote: > Hi all, hope you can help with my backup doubts. > > 1) I work with a Linux desktop box and a dual Win/Linux laptop. I just > bought a 160 Gb portable disk to use as backup and to keep the Linux > installations of my two machines reasonably in sync. I created three > partitions: > > NTFS 60 Gb: I use to backup the Win part with Acronis True Image > ext3 80 Gb : linux backup > FAT32 10 Gb: "swap" area for things I want to access with Win and > Linux. > > Is this a good solution? > > 2) A trip is coming up and I don't have time to look into complex > backup solutions for the Linux part. I need to copy about 40 Gb of > data from a hard disk in my desktop box (Suse 10.0) to an external > portable disk. Should I just do cp -rp * or is there a better/faster/ > safer way? I prefer cpio -p option. With find. > > I plan to copy /home, /tmp, and a /rpm directory with a bunch of rpms. > Any other things one normally backs up? I would do find -name /home /tmp /etc tmp -print | cpio --pass-through --make-directories ... destination_directory man find man cpio > > 3) For future reference, what is a good way to keep the two Linux > boxes in sync? (they are different processors so a perfect disk copy > won't work). > > Thanks a lot. > -- .~. Jean-David Beyer Registered Linux User 85642. /V\ PGP-Key: 9A2FC99A Registered Machine 241939. /( )\ Shrewsbury, New Jersey http://counter.li.org ^^-^^ 13:10:01 up 12 days, 1:33, 3 users, load average: 4.45, 4.34, 4.19 |
| |||
| Thanks. Hope you can answer a couple more question: This is a first copy (destination directory is empty), is there an advantage in using cpio instead of cp -r ? For the purpose of synchronization, is cpio a good choice, or should I look into rsync or something like BackupPC? The cpio options you gave didn't work for me, but this seems to work: find /home/ /tmp/ /etc/ -print | cpio --pass-through --make- directories -m destination Is this correct? > I prefer cpio -p option. With find. > > > > > I plan to copy /home, /tmp, and a /rpm directory with a bunch of rpms. > > Any other things one normally backs up? > > I would do > > find -name /home /tmp /etc tmp -print | cpio --pass-through > --make-directories > ... > destination_directory > > man find > man cpio > > > > > 3) For future reference, what is a good way to keep the two Linux > > boxes in sync? (they are different processors so a perfect disk copy > > won't work). > > > Thanks a lot. > > -- > .~. Jean-David Beyer Registered Linux User 85642. > /V\ PGP-Key: 9A2FC99A Registered Machine 241939. > /( )\ Shrewsbury, New Jersey http://counter.li.org > ^^-^^ 13:10:01 up 12 days, 1:33, 3 users, load average: 4.45, 4.34, 4.19 |
| |||
| eric wrote: > Thanks. Hope you can answer a couple more question: > > This is a first copy (destination directory is empty), is there an > advantage in using cpio instead of cp -r ? I just like it better. It can transfer the stuff in bigger blocks which is probably faster. > > For the purpose of synchronization, is cpio a good choice, or should > I look into rsync or something like BackupPC? I think of rsync as a means for keeping multiple systems the same. Backup is something different. If the disks were on different machines, probably rsync would be the way to go. > > The cpio options you gave didn't work for me, Sorry. I have not done it in a while, which is why I referred you to the manual pages. I guess --preserve-modification-time (-m) is a good idea, if the modification times matter to you (as well they might). > but this seems to work: > > find /home/ /tmp/ /etc/ -print | cpio --pass-through --make- > directories -m > destination > > Is this correct? It should be, where "destination" is the name of the root file system on the backup device. As far as I can tell, you only added the -m flag and trailing slash on the file systems. I am not sure what the trailing slash accomplishes. I normally do these to mag tape, which is pretty easy, so I can set the optimum block-size for the tape drive. For disks, the default may be OK, or you might want to set it to 4096 or something. BTW, if you have any sparse files, you might want --sparse as well. If the rpm files are installed rpms, you might well want to copy at least /usr/lib/rpm. When I do backups, I do _everything_ except /proc and /tmp. With newer kernels, there is probably no sense doing /dev either, but with a 2.4 kernel, there is. > >> I prefer cpio -p option. With find. >> >> >> >>> I plan to copy /home, /tmp, and a /rpm directory with a bunch of rpms. >>> Any other things one normally backs up? >> I would do >> >> find -name /home /tmp /etc tmp -print | cpio --pass-through >> --make-directories >> ... >> destination_directory >> >> man find >> man cpio >> >> >> >>> 3) For future reference, what is a good way to keep the two Linux >>> boxes in sync? (they are different processors so a perfect disk copy >>> won't work). >>> Thanks a lot. >> -- >> .~. Jean-David Beyer Registered Linux User 85642. >> /V\ PGP-Key: 9A2FC99A Registered Machine 241939. >> /( )\ Shrewsbury, New Jersey http://counter.li.org >> ^^-^^ 13:10:01 up 12 days, 1:33, 3 users, load average: 4.45, 4.34, 4.19 > > -- .~. Jean-David Beyer Registered Linux User 85642. /V\ PGP-Key: 9A2FC99A Registered Machine 241939. /( )\ Shrewsbury, New Jersey http://counter.li.org ^^-^^ 16:35:01 up 12 days, 4:58, 3 users, load average: 4.23, 4.14, 4.03 |
| |||
| eric wrote: >Hi all, hope you can help with my backup doubts. > >1) I work with a Linux desktop box and a dual Win/Linux laptop. I just >bought a 160 Gb portable disk to use as backup and to keep the Linux >installations of my two machines reasonably in sync. I created three >partitions: > > NTFS 60 Gb: I use to backup the Win part with Acronis True Image > ext3 80 Gb : linux backup > FAT32 10 Gb: "swap" area for things I want to access with Win and >Linux. > >Is this a good solution? > Looks good to me. >2) A trip is coming up and I don't have time to look into complex >backup solutions for the Linux part. I need to copy about 40 Gb of >data from a hard disk in my desktop box (Suse 10.0) to an external >portable disk. Should I just do cp -rp * or is there a better/faster/ >safer way? > >I plan to copy /home, /tmp, and a /rpm directory with a bunch of rpms. >Any other things one normally backs up? > >3) For future reference, what is a good way to keep the two Linux >boxes in sync? (they are different processors so a perfect disk copy >won't work). > rsync is great for this: In it's simplest form do: rsync -av /home /tmp /rpm /destination_mount_point This will copy the files over to your portable disk mounted at /destination_mount_point If you want, the first time you can use: cp -pR /home /tmp /rpm /destination_mount_point instead but it doesn't really matter. I'd just use the rsync command. To sync up again, just do the same command. To truly, sync up your files such that files that are deleted on the source dirs are deleted on the portable disk too, you should do: rsync -av --delete /home /tmp /rpm /destination_mount_point I use this method to stage data to backup servers and have an online backup. It is simple and quick since it doesn't copy unchanged files. Good luck, Steve |
| ||||
| Thanks again. I like the suggestion of backing up everything. Sorry I wasn't more specific, what didn't work was the -name for me. Your post is most appreciated. > It should be, where "destination" is the name of the root file system on the > backup device. As far as I can tell, you only added the -m flag and trailing > slash on the file systems. > > I am not sure what the trailing slash accomplishes. > > I normally do these to mag tape, which is pretty easy, so I can set the > optimum block-size for the tape drive. For disks, the default may be OK, or > you might want to set it to 4096 or something. > > BTW, if you have any sparse files, you might want --sparse as well. > > If the rpm files are installed rpms, you might well want to copy at least > /usr/lib/rpm. > > When I do backups, I do _everything_ except /proc and /tmp. With newer > kernels, there is probably no sense doing /dev either, but with a 2.4 > kernel, there is. > > > > > > >> I prefer cpio -p option. With find. > > >>> I plan to copy /home, /tmp, and a /rpm directory with a bunch of rpms. > >>> Any other things one normally backs up? > >> I would do > > >> find -name /home /tmp /etc tmp -print | cpio --pass-through > >> --make-directories > >> ... > >> destination_directory > > >> man find > >> man cpio > > >>> 3) For future reference, what is a good way to keep the two Linux > >>> boxes in sync? (they are different processors so a perfect disk copy > >>> won't work). > >>> Thanks a lot. > >> -- > >> .~. Jean-David Beyer Registered Linux User 85642. > >> /V\ PGP-Key: 9A2FC99A Registered Machine 241939. > >> /( )\ Shrewsbury, New Jersey http://counter.li.org > >> ^^-^^ 13:10:01 up 12 days, 1:33, 3 users, load average: 4.45, 4.34, 4.19 > > -- > .~. Jean-David Beyer Registered Linux User 85642. > /V\ PGP-Key: 9A2FC99A Registered Machine 241939. > /( )\ Shrewsbury, New Jersey http://counter.li.org > ^^-^^ 16:35:01 up 12 days, 4:58, 3 users, load average: 4.23, 4.14, 4.03 |