Skip to content

Instantly share code, notes, and snippets.

@wesleybliss
Created May 3, 2017 21:02
Show Gist options
  • Save wesleybliss/8b8e39c4735379b5a8ab7b655c5d289d to your computer and use it in GitHub Desktop.
Save wesleybliss/8b8e39c4735379b5a8ab7b655c5d289d to your computer and use it in GitHub Desktop.
Backup repo sources + apps list on RPM based distros
#!/bin/bash
BASE="~/Dropbox/fedora-backups/installed-software-list"
# Backup sources
/bin/cp -LRf /etc/yum.repos.d/* "$BASE/etc_yum.repos.d/"
# Backup packages list
rpm -qa --qf "%{NAME}\n" | sort > "$BASE/dnf-installed-packages.log"
echo $(date) > "$BASE/last-run.timestamp"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment