Skip to content

omair445/oh-my-zsh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Oh My Zsh Backup System

This directory contains scripts and backups for managing your Oh My Zsh configuration. The system provides easy backup and restore functionality for your entire Oh My Zsh setup, including custom plugins, themes, and configurations.

Quick Start

Creating a Backup

# Using the alias (if configured in .zshrc)
backup-zsh

# Or directly
~/zsh_backup/backup_zsh.sh

Restoring a Backup

# Navigate to your backup directory
cd ~/zsh_backup/backup_YYYYMMDD_HHMMSS

# Run the restore script
./restore.sh

What Gets Backed Up

The backup system saves:

  • Complete Oh My Zsh installation
  • Your .zshrc configuration file
  • All custom plugins
  • All custom themes
  • A manifest of your installed plugins

Backup Structure

Each backup is stored in a timestamped directory:

~/zsh_backup/
└── backup_YYYYMMDD_HHMMSS/
    ├── .oh-my-zsh/           # Complete Oh My Zsh installation
    ├── .zshrc               # Your zsh configuration
    ├── plugins/             # Custom plugins
    ├── themes/              # Custom themes
    ├── plugins_manifest.txt # List of installed plugins
    └── restore.sh           # Restore script

Restore Process

The restore script (restore.sh) will:

  1. Install Oh My Zsh if not present
  2. Restore your .zshrc configuration
  3. Restore all custom plugins
  4. Restore all custom themes
  5. Install essential plugins (zsh-autosuggestions, zsh-syntax-highlighting)
  6. Provide instructions for final steps

Best Practices

  1. Regular Backups

    • Run backups before making major changes
    • Create backups monthly
    • Backup before system upgrades
  2. Version Control

    • Keep multiple backups for different configurations
    • Use the timestamp to identify when each backup was created
  3. System Migration

    • Copy the entire backup directory to the new system
    • Run the restore script in the new environment

Troubleshooting

Common Issues

  1. Permission Denied

    chmod +x ~/zsh_backup/backup_zsh.sh
    chmod +x ~/zsh_backup/backup_*/restore.sh
  2. Missing Plugins

    • Check the plugins_manifest.txt file
    • Manually install any missing plugins
  3. Restore Fails

    • Ensure Oh My Zsh is installed
    • Check for sufficient disk space
    • Verify file permissions

Maintenance

Cleaning Old Backups

# List all backups
ls -l ~/zsh_backup/

# Remove old backups (example: older than 30 days)
find ~/zsh_backup/ -type d -name "backup_*" -mtime +30 -exec rm -rf {} \;

Updating Backup Script

The backup script can be updated by editing:

vim ~/zsh_backup/backup_zsh.sh

Additional Resources

Contributor

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages