Re: Full system backup with rsync

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



On Mon, 17 Oct 2016 22:24:39 +0200, Ralf Mardorf wrote:
>On Mon, 17 Oct 2016 21:42:03 +0200, Merlin Büge wrote:
>>Also cp -pr does not preserve links or xattrs for example. Maybe cp
>>-ar would be more appropriate.  
>
>Ok, actually I regularly backup to a tar archive and at least links are
>preserved. I seemingly missed to use the --xattrs switch, fortunately
>this never caused an issue for me, but I consider to add it to my
>scripts soon.
>
>Thank you for the pointer and my apologies for the false advice.

[rocketmouse@archlinux ~]$ cd /tmp/
[rocketmouse@archlinux tmp]$ mkdir test
[rocketmouse@archlinux tmp]$ cd test/
[rocketmouse@archlinux test]$ touch 1.txt
[rocketmouse@archlinux test]$ ln -s 1.txt link.txt
[rocketmouse@archlinux test]$ ls
1.txt  link.txt
[rocketmouse@archlinux test]$ cd ..
[rocketmouse@archlinux tmp]$ cp -pr test/ test_2
[rocketmouse@archlinux tmp]$ ls test_2/
1.txt  link.txt
[rocketmouse@archlinux tmp]$ ls -l test test_2
test:
total 0
-rw-r--r-- 1 rocketmouse rocketmouse 0 Oct 17 22:26 1.txt
lrwxrwxrwx 1 rocketmouse rocketmouse 5 Oct 17 22:26 link.txt -> 1.txt

test_2:
total 0
-rw-r--r-- 1 rocketmouse rocketmouse 0 Oct 17 22:26 1.txt
lrwxrwxrwx 1 rocketmouse rocketmouse 5 Oct 17 22:26 link.txt -> 1.txt
[rocketmouse@archlinux tmp]$ cd test
[rocketmouse@archlinux test]$ ln 1.txt hardlink.txt
[rocketmouse@archlinux test]$ ls -l
total 0
-rw-r--r-- 2 rocketmouse rocketmouse 0 Oct 17 22:26 1.txt
-rw-r--r-- 2 rocketmouse rocketmouse 0 Oct 17 22:26 hardlink.txt
lrwxrwxrwx 1 rocketmouse rocketmouse 5 Oct 17 22:26 link.txt -> 1.txt
[rocketmouse@archlinux test]$ cd ..
[rocketmouse@archlinux tmp]$ cp -pr test/ test_2
[rocketmouse@archlinux tmp]$ ls -l test test_2
test:
total 0
-rw-r--r-- 2 rocketmouse rocketmouse 0 Oct 17 22:26 1.txt
-rw-r--r-- 2 rocketmouse rocketmouse 0 Oct 17 22:26 hardlink.txt
lrwxrwxrwx 1 rocketmouse rocketmouse 5 Oct 17 22:26 link.txt -> 1.txt

test_2:
total 0
-rw-r--r-- 1 rocketmouse rocketmouse   0 Oct 17 22:26 1.txt
lrwxrwxrwx 1 rocketmouse rocketmouse   5 Oct 17 22:26 link.txt -> 1.txt
drwxr-xr-x 2 rocketmouse rocketmouse 100 Oct 17 22:29 test
[rocketmouse@archlinux tmp]$

-- 
Death of ROXTerm
https://sourceforge.net/p/roxterm/discussion/422638/thread/60da6975/




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux