Re: Question about Backing up with tar

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10Dec2009 00:16, kevin <kevin@xxxxxxxxxxxxxx> wrote:
| I would like to know if this will work with fc9:
| 
| # sudo su
| # cd /
| # tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found
| --exclude=/backup.tgz --exclude=/mnt --exclude=/sys /
| 
| What I really want to know is this. I have two systems that are
| identical and would like to just copy one to the other and keep all
| permissions for each of the files and folders copied. Is this
| feasible or could someone point me to the right direction with some
| kind of tutorial?

I suggest rsync instead of tar. You can do stuff with tar like this:

  ssh master_system 'cd /; tar cf - .....' | ( cd /; tar xf - )

but it has several problems:

  - it will overwrite stuff, changed or not
  - it copies all the data over the link, changed or not
  - it won't delete stuff if the master_system has stuff removed

Rsync has a highly efficient algorithm that copies only changed data,
options for delete and an exclusion system somewhat more expressive than
tar's one.

Personally I recommend:
  - being more targeted: copy what needs to be the same only
    an highly inclusive copy such as yours risks damaging the second
    system if someone is making local changes
  - copy on a per-filesystem basis
    This really depends on your needs, which you need to spell out in
    more detail.
    The only time I've done what you're describing (copying everything)
    was on a system with a spare drive; I would copy the root, /var etc
    partitions to the spare drive. Each copy was only for its own
    filesystem, using rsync's -x option.
    That prevents walkig off into /home etc, which I didn't want to do.

See rsync's manual page. Read it a few times.
-- 
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

Four lines good, eight lines bad.       - the signature farm

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux