spacewalk-data-fsck

8

`spacewalk-data-fsck`

Helper utility to manage and compare packages on filesystem vs database.

            spacewalk-data-fsck [ -v | -S | -C | -O | -d | -f | -r | F ]

## Description

The spacewalk-data-fsck is a helper utility that allows you to verify the packages stored on the filesystem and compare them against the packages referenced on the database. You can verify if the packages from the database are present on the filesystem or vice-versa.

spacewalk-data-fsck also allows you to remove the packages from filesytem if that package is not being used by any channel.

By default, spacewalk-data-fsck will verify if the checksum of the RPM package matches with the checksum stored on the database. You can fix the file path by adding the option --fix-file-path.

All the operations performed by spacewalk-data-fsck will be logged at `/var/log/rhn/spacewalk-data-fsck.log`.

Consider running spacewalk-data-fsck on a non-production period. The system/database activity will increase considerabily.

## Options

-h, --help

- show this help message and exit

-v, --verbose

- Increase verbosity.

-S, --no-size

- Don't check package size

-C, --no-checksum

- Don't check package checksum

-O, --no-nevrao

- Don't check package name, epoch, version, release, arch, org

-d, --db-only

- Check only if packages from database are present on filesystem.

-f, --fs-only

- Check only if packages from filesystem are in the database.

-r, --remove

- Automaticaly remove packages from filesystem not present in database.

-F, --fix-file-path

- Restores file paths, try this when you have NEVRAO mismatches. Do not run this command with another commands.

-R, --remove-mismatch

- Remove packages from filesystem that does not match the checksum stored in the database. This option is not valid when combined with options --db-only or --no-checksum. After removing the packages from the filesystem, remember to run satellite-sync or spacewalk-repo-sync to download the RPM file.

## Example

- `&THECOMMAND; -f -r` Delete all the packages from filesystem are not in the database.
- `&THECOMMAND; -F` Restore the file paths when NEVRAO mismatches.

## Authors

- Marcelo Moreira de Mello mmello@redhat.com