Skip to content

Instantly share code, notes, and snippets.

@johnliu55tw
Last active August 30, 2018 03:23
Show Gist options
  • Save johnliu55tw/5bb78fa42a8426de17ac1d0b3f551332 to your computer and use it in GitHub Desktop.
Save johnliu55tw/5bb78fa42a8426de17ac1d0b3f551332 to your computer and use it in GitHub Desktop.
Useful Tips/Commands/...

Change the passphrase of a private RSA/DSA key

$ ssh-keygen -p -f ~/.ssh/id_rsa

Full system backup/restore

Refer to Rsync#Full_system_backup for details.

Backup

# rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /path/to/backup/folder

Restore

# rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} /path/to/backup /destination/root/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment