Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
sys-backup
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ndoumbe
sys-backup
Commits
5dafcef7
Commit
5dafcef7
authored
Apr 07, 2023
by
Ndoumbe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add files
parent
96d1412e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
mongodb.sh
mongodb.sh
+9
-0
mysql.sh
mysql.sh
+9
-0
No files found.
mongodb.sh
View file @
5dafcef7
mkdir
-p
"backup_
${
APP
}
_
$(
date
+%d-%m-%y
)
"
mongodump
--host
"
$DB_HOST
"
--port
"
$DB_PORT
"
--username
"
$DB_USER
"
--password
"
$DB_PASSWORD
"
--db
"
$DB_NAME
"
--out
"backup_
${
APP
}
_
$(
date
+%d-%m-%y
)
"
tar
-zcvf
"backup_
${
APP
}
_
$(
date
+%d-%m-%y
)
.tar.gz"
"./backup_
${
APP
}
_
$(
date
+%d-%m-%y
)
"
aws s3
cp
"backup_
${
APP
}
_
$(
date
+%d-%m-%y
)
.tar.gz"
"
$BUCKET
"
curl
-X
POST
--data-urlencode
"payload={
\"
channel
\"
:
\"
#devops
\"
,
\"
username
\"
:
\"
BackupBot
\"
,
\"
text
\"
:
\"
Backup notification: Backup for
${
APP
}
successful :white_check_mark: .
\"
,
\"
icon_emoji
\"
:
\"
:baamtu:
\"
}"
"
$SLACK_WEBHOOK_URL
"
\ No newline at end of file
mysql.sh
View file @
5dafcef7
mkdir
-p
"backup_
${
APP
}
_
$(
date
+%d-%m-%y
)
"
mysqldump
--host
=
"
$DB_HOST
"
--port
=
"
$DB_PORT
"
--user
=
"
$DB_USER
"
--password
=
"
$DB_PASSWORD
"
"
$DB_NAME
"
>
"backup_
${
APP
}
_
$(
date
+%d-%m-%y
)
/dump.sql"
tar
-zcvf
"backup_
${
APP
}
_
$(
date
+%d-%m-%y
)
.tar.gz"
"./backup_
${
APP
}
_
$(
date
+%d-%m-%y
)
"
aws s3
cp
"backup_
${
APP
}
_
$(
date
+%d-%m-%y
)
.tar.gz"
"
$BUCKET
"
curl
-X
POST
--data-urlencode
"payload={
\"
channel
\"
:
\"
#devops
\"
,
\"
username
\"
:
\"
BackupBot
\"
,
\"
text
\"
:
\"
Backup notification: Backup for
${
APP
}
successful :white_check_mark: .
\"
,
\"
icon_emoji
\"
:
\"
:baamtu:
\"
}"
"
$SLACK_WEBHOOK_URL
"
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment