Installing FSArchiver on Rocky Linux

Wiki.TerraBase.info
Jump to navigation Jump to search

Installing FS Archiver takes a couple of steps beyond what is described on their website.

Get it from from https://www.fsarchiver.org/installation/;

  • wget https://github.com/fdupoux/fsarchiver/releases/download/0.8.6/fsarchiver-0.8.6-1.el7.x86_64.rpm

Install it (spoiler alert, it won't work);

  • yum install fsarchiver-0.8.6-1.el7.x86_64.rpm

Error:

Problem: conflicting requests

  - nothing provides libgcrypt.so.11()(64bit) needed by fsarchiver-0.8.6-1.el7.x86_64

  - nothing provides libgcrypt.so.11(GCRYPT_1.2)(64bit) needed by fsarchiver-0.8.6-1.el7.x86_64

OK, get that package (it isn't available with Rocky / CentOS 8 or 9, but it is with Cent OS 7)

  • wget https://rpmfind.net/linux/centos/7.9.2009/os/x86_64/Packages/libgcrypt-1.5.3-14.el7.x86_64.rpm

Install it (spoiler alert, it won't work);

yum install libgcrypt-1.5.3-14.el7.x86_64.rpm

Error:

Problem: problem with installed package systemd-libs-239-68.el8_7.2.x86_64

  - package systemd-libs-239-68.el8_7.2.x86_64 requires libgcrypt.so.20()(64bit), but none of the providers can be installed

  - package systemd-libs-239-68.el8_7.2.x86_64 requires libgcrypt.so.20(GCRYPT_1.6)(64bit), but none of the providers can be installed

  - package systemd-libs-239-68.el8.x86_64 requires libgcrypt.so.20()(64bit), but none of the providers can be installed

  - package systemd-libs-239-68.el8.x86_64 requires libgcrypt.so.20(GCRYPT_1.6)(64bit), but none of the providers can be installed

  - cannot install both libgcrypt-1.5.3-14.el7.x86_64 and libgcrypt-1.8.5-7.el8_6.x86_64

  - conflicting requests

This "conflict" makes no sense in terms of files.

Let's take a look at what's inside the libgcrypt-1.5.3-14.el7.x86_64.rpm file;

Extract it: rpm2cpio libgcrypt-1.5.3-14.el7.x86_64.rpm | cpio -idmv (from https://www.cyberciti.biz/tips/how-to-extract-an-rpm-package-without-installing-it.html)

Contents of libgcrypt-1.5.3-14.el7.x86_64.rpm;

./etc/gcrypt
./usr/lib64/.libgcrypt.so.11.hmac
./usr/lib64/libgcrypt.so.11
./usr/lib64/libgcrypt.so.11.8.2
./usr/share/doc/libgcrypt-1.5.3
./usr/share/doc/libgcrypt-1.5.3/AUTHORS
./usr/share/doc/libgcrypt-1.5.3/COPYING.LIB
./usr/share/doc/libgcrypt-1.5.3/NEWS
./usr/share/doc/libgcrypt-1.5.3/THANKS

OK, what's inside the /usr/lib64 Directory on Rocky Linux;

libgcrypt.so -> libgcrypt.so.20
libgcrypt.so.20 -> libgcrypt.so.20.2.5
libgcrypt.so.20.2.5
.libgcrypt.so.20.hmac

...hmmm, no conflicts are going to arise there. Let's check CentOS 7;

libgcrypt.so.11 -> libgcrypt.so.11.8.2
libgcrypt.so.11.8.2
.libgcrypt.so.11.hmac

...confirmed. Ain't gonna be no conflict there!

Cool, let's install libgcrypt-1.5.3-14.el7.x86_64.rpm (spoiler alert, it wont work either);

  • yum install libgcrypt-1.5.3-14.el7.x86_64.rpm

Error:

Problem: problem with installed package systemd-libs-239-68.el8_7.2.x86_64

  - package systemd-libs-239-68.el8_7.2.x86_64 requires libgcrypt.so.20()(64bit), but none of the providers can be installed

  - package systemd-libs-239-68.el8_7.2.x86_64 requires libgcrypt.so.20(GCRYPT_1.6)(64bit), but none of the providers can be installed

  - package systemd-libs-239-68.el8.x86_64 requires libgcrypt.so.20()(64bit), but none of the providers can be installed

  - package systemd-libs-239-68.el8.x86_64 requires libgcrypt.so.20(GCRYPT_1.6)(64bit), but none of the providers can be installed

  - cannot install both libgcrypt-1.5.3-14.el7.x86_64 and libgcrypt-1.8.5-7.el8_6.x86_64

  - conflicting requests

Forget it. Do it manually;

  • Copy the libgcrypt.so.11.8.s and .libgcrypt.so.11.hmac to /usr/lib64 from the extracted RPM file (see above)
  • Create a symbolic link: ln -s libgcrypt.so.11.8.2 libgcrypt.so.11

OK, back to installing FSArchiver (spoiler alert yet again, nothing happens / nothing is accomplished);

  • yum install fsarchiver-0.8.6-1.el7.x86_64.rpm

Dependencies resolved.

Nothing to do.

Complete!

Forget this crap. And to forget it we'll need to jump slightly outside of the YUM / DNF paradigm;

  • rpm -Uhv /usr/src/fsarchiver-0.8.6-1.el7.x86_64.rpm --nodeps

Done! Installed! Finished! Working;

fsarchiver
====> fsarchiver version 0.8.6 (2021-02-27) - http://www.fsarchiver.org <====
Distributed under the GPL v2 license (GNU General Public License v2).
 * usage: fsarchiver [<options>] <command> <archive> [<dev1> [<dev2> [...]]]
<commands>
 * savefs: save filesystems to an archive file (backup a device to a file)
 * restfs: restore filesystems from an archive (overwrites the existing data)
 * savedir: save directories to the archive (similar to a compressed tarball)
 * restdir: restore data from an archive which is not based on a filesystem
 * archinfo: show information about an existing archive file and its contents
 * probe [detailed]: show list of filesystems detected on the disks
<options>
 -o: overwrite the archive if it already exists instead of failing
 -v: verbose mode (can be used several times to increase the level of details)
 -d: debug mode (can be used several times to increase the level of details)
 -A: allow to save a filesystem which is mounted in read-write (live backup)
 -a: allow to save a filesystem when acls and xattrs are not supported
 -x: enable support for experimental features (they are disabled by default)
 -e <pattern>: exclude files and directories that match that pattern
 -L <label>: set the label of the archive (comment about the contents)
 -z <level>: legacy compression level from 0 (very fast) to 9 (very good)
 -Z <level>: zstd compression level from 1 (very fast) to 22 (very good)
 -s <mbsize>: split the archive into several files of <mbsize> megabytes each
 -j <count>: create more than one (de)compression thread. useful on multi-core cpu
 -c <password>: encrypt/decrypt data in archive, "-c -" for interactive password
 -h: show help and information about how to use fsarchiver with examples
 -V: show program version and exit
<examples>
 * save only one filesystem (/dev/sda1) to an archive:
   fsarchiver savefs /data/myarchive1.fsa /dev/sda1
 * save two filesystems (/dev/sda1 and /dev/sdb1) to an archive:
   fsarchiver savefs /data/myarchive2.fsa /dev/sda1 /dev/sdb1
 * restore the first filesystem from an archive (first = number 0):
   fsarchiver restfs /data/myarchive2.fsa id=0,dest=/dev/sda1
 * restore the second filesystem from an archive (second = number 1):
   fsarchiver restfs /data/myarchive2.fsa id=1,dest=/dev/sdb1
 * restore two filesystems from an archive (number 0 and 1):
   fsarchiver restfs /data/arch2.fsa id=0,dest=/dev/sda1 id=1,dest=/dev/sdb1
 * restore a filesystem from an archive and convert it to reiserfs:
   fsarchiver restfs /data/myarchive1.fsa id=0,dest=/dev/sda1,mkfs=reiserfs
 * restore a filesystem from an archive and specify extra mkfs options:
   fsarchiver restfs /data/myarchive1.fsa id=0,dest=/dev/sda1,mkfs=ext4,mkfsopt="-I 256"
 * restore a filesystem from an archive and specify a new label and a new UUID:
   fsarchiver restfs /data/myarchive1.fsa id=0,dest=/dev/sda1,label=root,uuid=5f6e5f4f-dc2a-4dbd-a6ea-9ca997cde75e
 * save the contents of /usr/src/linux to an archive (similar to tar):
   fsarchiver savedir /data/linux-sources.fsa /usr/src/linux
 * save a filesystem (/dev/sda1) to an archive split into volumes of 680MB:
   fsarchiver savefs -s 680 /data/myarchive1.fsa /dev/sda1
 * save a filesystem and exclude all files/dirs called 'pagefile.*':
   fsarchiver savefs /data/myarchive.fsa /dev/sda1 --exclude='pagefile.*'
 * generic exclude for 'share' such as '/usr/share' and '/usr/local/share':
   fsarchiver savefs /data/myarchive.fsa --exclude=share
 * absolute exclude valid for '/usr/share' but not for '/usr/local/share':
   fsarchiver savefs /data/myarchive.fsa --exclude=/usr/share
 * save a filesystem (/dev/sda1) to an encrypted archive:
   fsarchiver savefs -c mypassword /data/myarchive1.fsa /dev/sda1
 * same as before but prompt for password in the terminal:
   fsarchiver savefs -c - /data/myarchive1.fsa /dev/sda1
 * extract an archive made of simple files to /tmp/extract:
   fsarchiver restdir /data/linux-sources.fsa /tmp/extract
 * show information about an archive and its filesystems:
   fsarchiver archinfo /data/myarchive2.fsa

Rough Notes Below (above article derived from below notes)

To install FS Archiver from https://www.fsarchiver.org/installation/

wget https://github.com/fdupoux/fsarchiver/releases/download/0.8.6/fsarchiver-0.8.6-1.el7.x86_64.rpm

yum install libgcrypt-1.5.3-14.el7.x86_64.rpm

Error:

Problem: problem with installed package systemd-libs-239-68.el8_7.2.x86_64

  - package systemd-libs-239-68.el8_7.2.x86_64 requires libgcrypt.so.20()(64bit), but none of the providers can be installed

  - package systemd-libs-239-68.el8_7.2.x86_64 requires libgcrypt.so.20(GCRYPT_1.6)(64bit), but none of the providers can be installed

  - package systemd-libs-239-68.el8.x86_64 requires libgcrypt.so.20()(64bit), but none of the providers can be installed

  - package systemd-libs-239-68.el8.x86_64 requires libgcrypt.so.20(GCRYPT_1.6)(64bit), but none of the providers can be installed

  - cannot install both libgcrypt-1.5.3-14.el7.x86_64 and libgcrypt-1.8.5-7.el8_6.x86_64

  - conflicting requests

 

Makes no sense in terms of files (see below)

Contents of libgcrypt-1.5.3-14.el7.x86_64.rpm (from https://rpmfind.net/linux/centos/7.9.2009/os/x86_64/Packages/libgcrypt-1.5.3-14.el7.x86_64.rpm)

Extract: rpm2cpio libgcrypt-1.5.3-14.el7.x86_64.rpm | cpio -idmv (from https://www.cyberciti.biz/tips/how-to-extract-an-rpm-package-without-installing-it.html)

./etc/gcrypt

./usr/lib64/.libgcrypt.so.11.hmac

./usr/lib64/libgcrypt.so.11

./usr/lib64/libgcrypt.so.11.8.2

./usr/share/doc/libgcrypt-1.5.3

./usr/share/doc/libgcrypt-1.5.3/AUTHORS

./usr/share/doc/libgcrypt-1.5.3/COPYING.LIB

./usr/share/doc/libgcrypt-1.5.3/NEWS

./usr/share/doc/libgcrypt-1.5.3/THANKS

Rocky Linux 8

lrwxrwxrwx.   1 root root       15 Jun 28  2022 libgcrypt.so -> libgcrypt.so.20

lrwxrwxrwx.   1 root root       19 Jun 28  2022 libgcrypt.so.20 -> libgcrypt.so.20.2.5

-rwxr-xr-x.   1 root root  1187328 Jun 28  2022 libgcrypt.so.20.2.5

-rw-r--r--.   1 root root       65 Jun 28  2022 .libgcrypt.so.20.hmac

CentOS 7

lrwxrwxrwx.   1 root root       19 Dec  7  2017 libgcrypt.so.11 -> libgcrypt.so.11.8.2

-rwxr-xr-x.   1 root root   535064 Aug  2  2017 libgcrypt.so.11.8.2

-rw-r--r--.   1 root root       65 Aug  2  2017 .libgcrypt.so.11.hmac

rpm -Uhv /usr/src/fsarchiver-0.8.6-1.el7.x86_64.rpm --nodeps

yum / dnf won't do it