[arch-general] Full system backup with rsync

Ralf Mardorf silver.bullet at zoho.com
Mon Oct 17 20:30:25 UTC 2016


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 at archlinux ~]$ cd /tmp/
[rocketmouse at archlinux tmp]$ mkdir test
[rocketmouse at archlinux tmp]$ cd test/
[rocketmouse at archlinux test]$ touch 1.txt
[rocketmouse at archlinux test]$ ln -s 1.txt link.txt
[rocketmouse at archlinux test]$ ls
1.txt  link.txt
[rocketmouse at archlinux test]$ cd ..
[rocketmouse at archlinux tmp]$ cp -pr test/ test_2
[rocketmouse at archlinux tmp]$ ls test_2/
1.txt  link.txt
[rocketmouse at 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 at archlinux tmp]$ cd test
[rocketmouse at archlinux test]$ ln 1.txt hardlink.txt
[rocketmouse at 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 at archlinux test]$ cd ..
[rocketmouse at archlinux tmp]$ cp -pr test/ test_2
[rocketmouse at 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 at archlinux tmp]$

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


More information about the arch-general mailing list