https://github.com/apajo/sysenv
Backup your system or personal configuration files
https://github.com/apajo/sysenv
Last synced: 3 months ago
JSON representation
Backup your system or personal configuration files
- Host: GitHub
- URL: https://github.com/apajo/sysenv
- Owner: apajo
- License: apache-2.0
- Created: 2022-02-18T17:14:19.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-04-19T02:00:36.000Z (about 3 years ago)
- Last Synced: 2025-01-14T15:20:43.791Z (4 months ago)
- Language: Shell
- Homepage:
- Size: 74.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Sysenv
============### Introduction
[Sysenv](https://github.com/apajo/sysenv) is a helper application for backing up you (system/personal) configuration files.
At it's core, it adds some scripts for easier usage of the [yadm](https://github.com/TheLocehiliosan/yadm/) application (wich also is basically a wrapper for the [git](https://github.com/git/git) applicatation)### Prerequisites
* Debian distro based OS (with aptitude package manager) (tested on Ubuntu 20.04)
* sudo privileges on your device or system### Installation
To install run the command:
```shell
. <(curl -L https://raw.githubusercontent.com/apajo/sysenv/master/src/install)
```> you will be prompted for your __repository url__ and __device name__ (or branch in git)
This will install you few applications:
* [sysenv](https://github.com/apajo/sysenv) - helper scripts for [yadm](https://github.com/TheLocehiliosan/yadm/)
* [yadm](https://github.com/TheLocehiliosan/yadm/) - a git wrapper with some extra functionality
* [git](https://github.com/git/git) - for managing your repositoryIt also adds `syadm` command your shell - it's yadm with sudo privileges (for system file backup)
### Commands
`sysenv [cmd]`
There are several [sysenv](https://github.com/apajo/sysenv) commands available, main ones being:
* __update__ - update the [sysenv](https://github.com/apajo/sysenv) application
* __save__ - save your configuration to the repository
* __load__ - load your configuration from the repository
* __setup__ - setup your repo and branch (or "device name")### Basic usage
1) Add files to backup:
```shell
$ sysenv add [path_to_your_file]
```2) Save your files to the repo
```shell
$ sysenv save
```3) After changing the previously added file, you can simply save the changes with:
```shell
$ sysenv save
```> Note! As with [git](https://github.com/git/git), after adding files, they will be tracked.
#### Load changes from another device
If you've done any changes to the repository from another device you can load them with:
```shell
$ sysenv load
```#### Changing repository (and branch)
```bash
$ sysenv setup [url] [device/branch]
```#### Updating
Update the sysenv application
```bash
$ sysenv update
```### Versioning
Choosing version numbers for [sysenv](https://github.com/apajo/sysenv) is done following the [semantic versioning](https://semver.org/)
### Testing
#### Setup
To test sysenv you need to have [Docker](https://github.com/jenkinsci/docker) installed on your system.
Add correct ssh key files to the `test/files/.ssh/` directory.
Add repository url and branch name in `test/files/.install` file.
While in `test` directory, run:
```bash
$ make all
```or for more help run:
```bash
$ make help
```#### Run
### Future work
That's it for now! Future work include the following:
* Corss-distro package manager (such as Nix-OS)