Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
6fd4d2b0
Commit
6fd4d2b0
authored
9 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Deprecate backup of github projects
Since gogs can do that
parent
15c9d386
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone
+0
-53
0 additions, 53 deletions
src/freedombone
with
0 additions
and
53 deletions
src/freedombone
+
0
−
53
View file @
6fd4d2b0
...
...
@@ -321,12 +321,6 @@ CREATE_GIT_PROJECT_COMMAND='create-project'
# File which keeps track of what has already been installed
COMPLETION_FILE=$HOME/freedombone-completed.txt
# Your github username
GITHUB_USERNAME=
# Directory where github projects will be backed up
GITHUB_BACKUP_DIRECTORY=/var/backups/github
# Used to indicate whether the backup contains MariaDB databases or not
BACKUP_INCLUDES_DATABASES="no"
...
...
@@ -1076,12 +1070,6 @@ function read_configuration {
if grep -q "ROUTER_IP_ADDRESS" $CONFIGURATION_FILE; then
ROUTER_IP_ADDRESS=$(grep "ROUTER_IP_ADDRESS" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "GITHUB_USERNAME" $CONFIGURATION_FILE; then
GITHUB_USERNAME=$(grep "GITHUB_USERNAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "GITHUB_BACKUP_DIRECTORY" $CONFIGURATION_FILE; then
GITHUB_BACKUP_DIRECTORY=$(grep "GITHUB_BACKUP_DIRECTORY" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "CPU_CORES" $CONFIGURATION_FILE; then
CPU_CORES=$(grep "CPU_CORES" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
...
...
@@ -11339,46 +11327,6 @@ function create_git_project {
echo 'create_git_project' >> $COMPLETION_FILE
}
# Create daily backups of any projects on Github
# Then if Github goes away, turns evil, is censored or has
# outages then you still have access to your projects
function backup_github_projects {
if grep -Fxq "backup_github_projects" $COMPLETION_FILE; then
return
fi
if [ ! $GITHUB_USERNAME ]; then
return 731
fi
if [ ! $GITHUB_BACKUP_DIRECTORY ]; then
return 732
fi
apt-get -y install git
# create a github backups directory if needed
if [ ! -d $GITHUB_BACKUP_DIRECTORY ]; then
mkdir -p $GITHUB_BACKUP_DIRECTORY
fi
# get the backup utility
cd $INSTALL_DIR
git clone https://github.com/josegonzalez/python-github-backup
# install it
cd $INSTALL_DIR/python-github-backup
python setup.py install
# add a daily cron entry
echo '#!/bin/bash' > /etc/cron.daily/github
echo "github-backup $GITHUB_USERNAME -o $GITHUB_BACKUP_DIRECTORY --repositories" >> /etc/cron.daily/github
echo 'exit 0' >> /etc/cron.daily/github
chmod +x /etc/cron.daily/github
# do an initial backup
/etc/cron.daily/github
echo 'backup_github_projects' >> $COMPLETION_FILE
}
function check_date {
curr_date=$(date)
if [[ $curr_date == *"1970"* ]]; then
...
...
@@ -11876,7 +11824,6 @@ set_your_domain_name
time_synchronisation
configure_internet_protocol
create_git_project
backup_github_projects
configure_ssh
remove_instructions_from_motd
check_hwrng
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment