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
a0972bab
Commit
a0972bab
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Backup and restore matrix identity server
parent
347a1728
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-app-matrix
+28
-0
28 additions, 0 deletions
src/freedombone-app-matrix
with
28 additions
and
0 deletions
src/freedombone-app-matrix
+
28
−
0
View file @
a0972bab
...
...
@@ -342,6 +342,10 @@ function backup_local_matrix {
if
[
-d
$source_directory
]
;
then
backup_directory_to_usb
$source_directory
matrixdata
fi
source_directory
=
/etc/sydent
if
[
-d
$source_directory
]
;
then
backup_directory_to_usb
$source_directory
matrixid
fi
systemctl start matrix
fi
}
...
...
@@ -373,6 +377,17 @@ function restore_local_matrix {
rm
-rf
$temp_restore_dir
chown
-R
matrix:matrix
$MATRIX_DATA_DIR
temp_restore_dir
=
/root/tempmatrixid
restore_directory_from_usb
$temp_restore_dir
matrixid
cp
-r
$temp_restore_dir
/etc/sydent/
*
/etc/sydent
if
[
!
"
$?
"
=
"0"
]
;
then
function_check backup_unmount_drive
backup_unmount_drive
exit
29562
fi
rm
-rf
$temp_restore_dir
chown
-R
matrix:matrix /etc/sydent
systemctl start matrix
fi
}
...
...
@@ -387,6 +402,10 @@ function backup_remote_matrix {
if
[
-d
$source_directory
]
;
then
backup_directory_to_friend
$source_directory
matrixdata
fi
source_directory
=
/etc/sydent
if
[
-d
$source_directory
]
;
then
backup_directory_to_friend
$source_directory
matrixid
fi
systemctl start matrix
fi
}
...
...
@@ -414,6 +433,15 @@ function restore_remote_matrix {
rm
-rf
$temp_restore_dir
chown
-R
matrix:matrix
$MATRIX_DATA_DIR
temp_restore_dir
=
/root/tempmatrixid
restore_directory_from_friend
$temp_restore_dir
matrixid
cp
-r
$temp_restore_dir
/etc/sydent/
*
/etc/sydent
if
[
!
"
$?
"
=
"0"
]
;
then
exit
738356
fi
rm
-rf
$temp_restore_dir
chown
-R
matrix:matrix /etc/sydent
systemctl start matrix
fi
}
...
...
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