Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tetras-back
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NoCloud
Tetras-back
Commits
3a5cdf3b
Verified
Commit
3a5cdf3b
authored
Feb 9, 2019
by
David Beniamine
Browse files
Options
Downloads
Patches
Plain Diff
Create archive out of destination directory
parent
85fbc6a6
No related branches found
No related tags found
No related merge requests found
Pipeline
#151
passed
Feb 9, 2019
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/scripts/backup_nocloud.sh
+11
-4
11 additions, 4 deletions
src/scripts/backup_nocloud.sh
with
11 additions
and
4 deletions
src/scripts/backup_nocloud.sh
+
11
−
4
View file @
3a5cdf3b
...
...
@@ -84,23 +84,30 @@ sauvegarde_serveur(){
fi
do_log
"Creation de l'archive configuration serveur"
[
!
-z
"
$SERVICES
"
]
&&
systemctl stop
$SERVICES
tar
czf
$vopt
$dest
/serveur.tgz
$srv_directories
tar
czf
$vopt
/tmp
/serveur.tgz
$srv_directories
ret
=
$?
[
!
-z
"
$SERVICES
"
]
&&
systemctl start
$SERVICES
if
[
$ret
-eq
1
]
then
# only warn on tar return code 1
do_log
"Attention: des fichiers on été modifié durant la sauvegarde de l'archive serveur"
return
0
else
else
[
$ret
-ne
0
]
return
$ret
fi
mv
/tmp/serveur.tgz
$dest
/
if
[
$ret
-ne
0]
then
# only warn on tar return code 1
do_log
"Impossible de copier serveur.tgz dans
$dest
/"
fi
return
$ret
}
sauvegarde_donnees
(){
if
$archive
then
tar
cvzf
$dest
/Donnees.tar.gz /home
tar
cvzf /tmp/Donnees.tar.gz /home
mv
/tmp/Donnees.tar.gz
$dest
/
else
cp
$voptminus
-r
/home
$dest
/Donnees
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
sign in
to comment