Here’s how to restore or set the Bash prompt on RHEL systems.
echo "PS1='\u@\h \w]\$'" >> ~/.bashrc source ~/.bashrc |
cloud engineer
Here’s how to restore or set the Bash prompt on RHEL systems.
echo "PS1='\u@\h \w]\$'" >> ~/.bashrc source ~/.bashrc |
echo "PS1='\u@\h \w]\$'" >> ~/.bashrc source ~/.bashrc
iptables can be saved or loaded from a file. Here’s a way to do it.
Saving to a file
# Debian/Ubuntu iptables-save > /etc/iptables/rules.v4 # Redhat/Centos/Rocky iptables-save > /etc/sysconfig/iptables |
# Debian/Ubuntu iptables-save > /etc/iptables/rules.v4 # Redhat/Centos/Rocky iptables-save > /etc/sysconfig/iptables
Loading from a file
# Debian/Ubuntu iptables-restore > /etc/iptables/rules.v4 # Redhat/Centos/Rocky iptables-restore > /etc/sysconfig/iptables |
# Debian/Ubuntu iptables-restore > /etc/iptables/rules.v4 # Redhat/Centos/Rocky iptables-restore > /etc/sysconfig/iptables
Listing rules
iptables -L |
iptables -L
Here’s the process to restore Winbind.
Restore old config.
cp /etc/sssd/sssd.conf-xxxxxxx /etc/sssd/sssd.conf cp /etc/krb5.conf-xxxxxxx /etc/krb5.conf |
cp /etc/sssd/sssd.conf-xxxxxxx /etc/sssd/sssd.conf cp /etc/krb5.conf-xxxxxxx /etc/krb5.conf
Disable SSSD. Authconfig creates /etc/nswitch.conf.
authconfig --disablesssd --disablesssdauth --updateall |
authconfig --disablesssd --disablesssdauth --updateall
Start Winbind.
service winbind start; service smb start; service nmb start |
service winbind start; service smb start; service nmb start
If you have an existing EFS that’s unencrypted, you can encrypt it be creating a snapshot using AWS Backup, and then restoring the file system to a new EFS with encryption. If you choose to restore in a directory in the same file system, it will not be encrypted. It has to be a new EFS. In addition, you’ll be asked to select which encryption key to use. The default key will work, unless you have your own.
In order to restore a MySQL database to another database, use routines and triggers.
mysqldump -p user -p --routines --triggers db1 > db1.sql |
mysqldump -p user -p --routines --triggers db1 > db1.sql
To restore to another database, just use the normal command.
mysql -u user -p db2 < db1.sql |
mysql -u user -p db2 < db1.sql