Created
May 3, 2017 21:02
-
-
Save wesleybliss/8b8e39c4735379b5a8ab7b655c5d289d to your computer and use it in GitHub Desktop.
Backup repo sources + apps list on RPM based distros
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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