https://github.com/seabbs/backup
Code to automate local backups of remote code
https://github.com/seabbs/backup
backup bash code github workflow
Last synced: 11 months ago
JSON representation
Code to automate local backups of remote code
- Host: GitHub
- URL: https://github.com/seabbs/backup
- Owner: seabbs
- License: mit
- Created: 2019-11-20T12:09:01.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-20T12:47:02.000Z (about 6 years ago)
- Last Synced: 2025-02-16T13:02:39.696Z (11 months ago)
- Topics: backup, bash, code, github, workflow
- Language: Shell
- Homepage:
- Size: 6.84 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Manage local GitHub backups
This repository contains an approach for dealing with backing up GitHub (and other remotes) locally. **It does not backup local work to remotes.** This approach has been developed for my own use so use with care. Please let me know if you have any suggestions for improvements.
# How it works
* Set up an archive folder (see `example` for pointers). This folder should contain a `projects.sh` file.
* `projects.sh` should contain an array of projects and `base_url` specifying where to pull from (currently this is shared across all projects).
* Modify the `archives.sh` file. This should contain all folders that need to be backed up (from remotes) and that have been setup as above. See `example-archives.sh` for a runnable example.
* (**Optional**) Run the following example bash command to check everything is work. *Warning: This will clone 3 of my repos - you may want to adjust this*.
```bash
bash update.sh example-archives.sh
```
* (**Optional**) Clean up the example.
```bash
mkdir tmp && cp example/projects.sh tmp/projects.sh
rm -r -f example && mv tmp example
```
* Run the following bash command (modifying to use your archives file). This will clone repositories listed in each `projects.sh` when they are not present and otherwise pull new updates.
```bash
bash update.sh archives.sh
```