You are not logged in.
Pages: 1
Hi
I'm migrating my installation to a new disk. Upon booting up and attempting to use pacman, I get an error about lacking content of /var/lib/pacman.
A quick inspection shows, that the entire folder, and many others, are missing.
I reattempt to copy the folder, but the same result is produced.
I copy using the following command:
sudo rsync -axX --info=progress2 /var /mnt/var
The content of my original /var/lib:
LANG=C sudo ls -la /var/lib/
total 212
drwxr-xr-x 47 root root 4096 Oct 12 14:50 .
drwxr-xr-x 14 root root 4096 Aug 14 19:49 ..
drwxr-xr-x 4 root root 4096 Mar 6 2016 AccountsService
drwx------ 2 root root 20480 Oct 12 15:00 NetworkManager
drwxr-xr-x 2 root root 4096 Oct 12 14:32 alsa
drwxr-xr-x 2 root root 4096 Mar 12 2013 arpd
drwx------ 3 root root 4096 Feb 5 2018 bluetooth
drwxr-xr-x 8 root root 4096 Nov 13 2017 ceph
drwxr-xr-x 3 colord colord 4096 Jan 5 2018 colord
drwx------ 2 root root 4096 Dec 22 2014 container
drwxr-xr-x 2 root root 4096 Jun 7 2012 dbus
drwxr-xr-x 2 root root 4096 Nov 3 2013 dhclient
drwxr-xr-x 2 root root 4096 Dec 16 2018 dhcpcd
drwxr-xr-x 3 root root 4096 Aug 12 19:10 dkms
drwxrwxrwt 2 root root 4096 Nov 16 2012 ex
drwxr-xr-x 2 geoclue geoclue 4096 Mar 16 2019 geoclue
drwxr-xr-x 4 root root 4096 Nov 13 2016 gssproxy
drwxr-xr-x 2 kdm kdm 4096 Mar 1 2015 kdm
drwxr-xr-x 2 root root 4096 Jun 24 22:25 krb5kdc
drwxr-xr-x 5 root root 4096 Aug 6 2018 libvirt
drwxr-xr-x 4 root root 4096 Jul 3 2016 lirc
drwxr-xr-x 2 root root 4096 Apr 13 2014 logmein-hamachi
-rw-r--r-- 1 root root 956 Oct 12 12:25 logrotate.status
drwx------ 2 root root 4096 Mar 1 2015 machines
drwx------ 2 mediatomb mediatomb 4096 Sep 21 2014 mediatomb
drwxr-xr-x 2 root root 4096 Jun 10 2012 misc
drwx------ 5 mysql mysql 4096 Apr 2 2013 mysql
drwxr-xr-x 7 root root 4096 Aug 12 19:10 nfs
drwxr-xr-x 2 ntp root 4096 Oct 12 13:25 ntp
drwxr-xr-x 2 root root 4096 Nov 17 2015 os-prober
drwxr-xr-x 4 root root 4096 Sep 18 20:22 pacman
drwx------ 2 root root 4096 Aug 6 2018 portables
drwx------ 3 root root 4096 Jan 5 2018 private
drwxr-xr-x 2 root root 4096 Feb 4 2013 rarian
drwx------ 2 rpc rpc 4096 Nov 13 2016 rpcbind
drwxr-xr-x 4 root root 4096 Mar 23 2018 samba
drwxr-xr-x 15 sddm sddm 4096 Feb 8 2017 sddm
drwxr-xr-x 2 root root 4096 Oct 22 2012 syslog-ng
drwxr-xr-x 9 root root 4096 May 19 21:53 systemd
drwxr-xr-x 5 root root 4096 Jun 11 2016 texmf
drwx------ 2 tor tor 4096 Dec 20 2013 tor
drwxr-x--- 2 tox-bootstrapd tox-bootstrapd 4096 Mar 27 2016 tox-bootstrapd
drwx------ 2 root root 4096 Oct 12 14:50 udisks
drwx------ 2 root root 4096 Jan 7 2013 udisks2
drwxr-xr-x 2 root root 4096 Jan 16 2019 uniconf
drwxr-xr-x 2 root root 4096 Mar 18 2013 upower
drwxr-xr-x 2 root root 4096 Feb 3 2014 usb_modeswitch
drwxr-xr-x 2 root root 4096 Jul 15 10:57 xkb
The content of my new /var/lib after attempting to copy:
LANG=C sudo ls -la var/lib/
total 64
drwxr-xr-x 16 root root 4096 Oct 12 14:24 .
drwxr-xr-x 11 root root 4096 Oct 12 14:41 ..
drwx------ 2 root root 4096 Oct 12 14:50 NetworkManager
drwx------ 3 root root 4096 Oct 12 14:23 bluetooth
drwxr-xr-x 3 colord colord 4096 Oct 12 14:23 colord
drwxr-xr-x 2 root root 4096 Oct 12 14:23 dbus
drwxr-xr-x 2 geoclue geoclue 4096 Oct 12 14:23 geoclue
drwx------ 2 root root 4096 Oct 12 14:23 machines
drwx------ 2 mysql mysql 4096 Oct 12 14:23 mysql
drwx------ 2 root root 4096 Oct 12 14:23 portables
drwx------ 2 root root 4096 Oct 12 14:23 private
drwx------ 2 rpc rpc 4096 Oct 12 14:23 rpcbind
drwxr-xr-x 14 sddm sddm 4096 Oct 12 14:38 sddm
drwxr-xr-x 7 root root 4096 Oct 12 14:23 systemd
drwx------ 2 tor tor 4096 Oct 12 14:23 tor
drwx------ 2 root root 4096 Oct 12 14:24 udisks2
The rest of my copy seems to have been okay, the system boots and works as expected otherwise so far (Of course I'm worried something else is also missing).
Am I missing something obvious here?
Offline
Obviously, rsync missed some directories and files. Perhaps it was not set to properly recurse down far enough? I'm not familiar with rsync but based on the differences between origin/var/lib and new/var/lib, rsync did a boo-boo.
Offline
Are (were) the lost directories empty (except for more empty directories, but no actual files)? (rsync has such option but it doesn't seem invoked by your command)
Offline
Restore a backup
If you wish to restore a backup, use the same rsync command that was executed but with the source and destination reversed.
You did do that ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
Are (were) the lost directories empty (except for more empty directories, but no actual files)? (rsync has such option but it doesn't seem invoked by your command)
No, at least /var/lib/pacman isn't. 71 MiB.
Restore a backup
If you wish to restore a backup, use the same rsync command that was executed but with the source and destination reversed.
You did do that ?
No the destination of the initial command is the disk I then boot into.
Offline
I had to doublecheck the rsync manpage, but think I found the cause.
rsync handles source & destination different then most commands, read Usage section of rsync manpage for details.
From your new system post output of ls -l /var/var/lib .
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
I had to doublecheck the rsync manpage, but think I found the cause.
rsync handles source & destination different then most commands, read Usage section of rsync manpage for details.From your new system post output of ls -l /var/var/lib .
Yeah I think this is part of my issue. It seems the first time the command is executed, /var is created. Any subsequent commands are going to /var/var.
Further investigation shows, that the first command does correctly copy the entire folder, but something during the boot sequence deletes the missing folders. Unfortunately I haven't had much time to investigate further.
Offline
Pages: 1