GithubHelp home page GithubHelp logo

initaldk / config-backup-upgrade-helper Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 2.0 243 KB

Set of scripts for management of configuration data for backups and slot upgrades

Python 92.04% Shell 7.96%

config-backup-upgrade-helper's Introduction

Config File Migration script for Cumulus Linux 2.x

  • Identify files that have changed since install in /etc, /root, /home
  • Optionally create a tar archive of these files to /mnt/persist/backup for archival and compare.
  • Optionally migrate these file to the alternate slot after installing a new CL image.
  • Ignore files that should never be backed up (blacklist)
  • Automatically clears /mnt/persist of all files except ./backup and license files.
  • Gives hotfix instructions if upgrading from a version before 2.5.3 due to RN-287
  • All changes are submitted for user approval before being made, unless 'force' option is used
  • Allows optional exclude of specific directories from archive or migration

Usage

  1. Copy the files from this repo to the switch user's home directory

  2. If using the 'sync' option, first install the desired new version using cl-img-install

  3. Use Migration tool with desired options:


sudo config_file_changes [-b] [-d backupdirname] [-n] [-s] [-f] [-v] [-x] [-h]
     
Determine changed config files. Optionally create backup archive or sync to other slot

no args - Default: Print output of changed config files to screen
-b, --backup, Create a backup archive of changed config files.
-d, --backup_dir [dir], Location to store backup archive. Default dir is /mnt/persist/backup
-n, --dryrun, Output to screen but don't create or remove any files
-s, --sync, Copy changed and added files to alternate slot
-f, --force, Used with -s. Do not ask before copying or removing files
-v, --debug, Verbose: Write out debugging logs to /var/log/config_file_changes.log
-x, --exclude dirs, Exclude a comma separated list of dirs: e.g.  -x /root,/home
-h, --help, Show this message

Caveats

  • Does not clear out old files from alternate slot before migration. This tool should only be used after cl-img-install creates a fresh install of an image.

  • Clears out all of /mnt/persist except for backup archives and license files. Copy any desired files from /mnt/persist off the box before running this script. This is done because having any config files in /mnt/persist is a dangerous workflow that can result in configuration surprises after a reboot.

  • As part of the migration operation, the 2nd slot on x86 platforms is mounted to /tmp/slotx_yyyy. If the script terminates abnormally, this would leave the mount active and prevents cl-img-install from running. To clear this condition, do: sudo umount /tmp/slot{x}_{yyyy}

  • Does not support certain old PowerPC platforms with Raw Flash implementations

    • Celestica/Penguin Arctica 4804i 1G (cel,kennisis)
    • Celestica/Penguin Arctica 4804X 10G (cel,redstone)
    • Celestica/Penguin Arctica 3200XL 40G (cel,smallstone)
    • Delta/Agema DNI-3448P (dni,3448p)
  • Does not support 3.0 at this time

  • Files are identified by their modification time, so a 'touch' on a file is considered a changed file

  • Backup archives should also be copied off the box as part of a HW failure and recovery plan if user doesn't use orchestration tools to provision and maintain configurations.

config-backup-upgrade-helper's People

Contributors

mbrownatcumulus avatar

Watchers

James Cloos avatar enterprisegoogle avatar  avatar

Forkers

guman rdarbha

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.