Backup and Restore

The Backup and Restore script allows you to create backups of your Termux environment and restore them when needed.

Usage

To run the backup and restore script:

termuxpert backup-restore

Features

  • Create a backup of your Termux environment
  • List available backups
  • Restore from a selected backup
  • Delete old backups
  1. Create a new backup
  2. List available backups
  3. Restore from backup
  4. Delete a backup
  5. Return to main menu

Backup Contents

The backup includes:

  • Home directory contents (excluding large directories like storage and downloads)
  • Termux configuration files
  • List of installed packages

Backup Location

Backups are stored in the ~/termux_backups directory by default. You can change this location in the config.sh file.

Restore Process

When restoring from a backup:

  1. The script will warn you that the restore process will overwrite your current Termux setup.
  2. You'll need to confirm before the restore process begins.
  3. After restoration, you'll need to restart Termux for all changes to take effect.

Customization

You can modify the backup and restore process by editing the bin/backup_restore.sh file. For example, you can change which directories are included in the backup or add additional steps to the restore process.