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
46e0aba9
Commit
46e0aba9
authored
9 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Separate remote backips file with spaces
parent
6077da4a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/freedombone-backup-remote
+5
-3
5 additions, 3 deletions
src/freedombone-backup-remote
src/freedombone-remote
+3
-3
3 additions, 3 deletions
src/freedombone-remote
src/freedombone-restore-remote
+3
-1
3 additions, 1 deletion
src/freedombone-restore-remote
with
11 additions
and
7 deletions
src/freedombone-backup-remote
+
5
−
3
View file @
46e0aba9
...
...
@@ -533,13 +533,15 @@ while read remote_server
do
# Get the server and its password
# Format is:
# username@domain
:/home/username <port number>
<ssh password>
# username@domain
<port number> /home/username
<ssh password>
REMOTE_SERVER
=
$(
echo
"
${
remote_server
}
"
|
awk
-F
' '
'{print $1}'
)
if
[
$REMOTE_SERVER
]
;
then
REMOTE_DOMAIN
=
$(
echo
"
${
remote_server
}
"
|
awk
-F
'
:
'
'{print $1}'
|
awk
-F
'@'
'{print $2}'
)
REMOTE_DOMAIN
=
$(
echo
"
${
remote_server
}
"
|
awk
-F
'
'
'{print $1}'
|
awk
-F
'@'
'{print $2}'
)
REMOTE_SSH_PORT
=
$(
echo
"
${
remote_server
}
"
|
awk
-F
' '
'{print $2}'
)
REMOTE_PASSWORD
=
$(
echo
"
${
remote_server
}
"
|
awk
-F
' '
'{print $3}'
)
REMOTE_DIRECTORY
=
$(
echo
"
${
remote_server
}
"
|
awk
-F
' '
'{print $3}'
)
REMOTE_PASSWORD
=
$(
echo
"
${
remote_server
}
"
|
awk
-F
' '
'{print $4}'
)
NOW
=
$(
date
+
"%Y-%m-%d %H:%M:%S"
)
REMOTE_SERVER
=
$REMOTE_SERVER
:
$REMOTE_DIRECTORY
echo
"
$NOW
Starting backup to
$REMOTE_SERVER
"
>>
/var/log/remotebackups.log
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-remote
+
3
−
3
View file @
46e0aba9
...
...
@@ -196,7 +196,7 @@ function interactive_configuration_remote_backups {
dialog
--title
"Password quality check"
--msgbox
"The reciprocal password given was too short. It must be at least
$MINIMUM_PASSWORD_LENGTH
characters"
6 40
else
echo
${
remote_ssh_reciprocal_username
}
:
${
remote_ssh_reciprocal_password
}
::::/home/
${
remote_ssh_reciprocal_username
}
:bash | newusers
echo
"
$remote_ssh_username
@
$remote_ssh_domain
:
$remote_ssh_port
/
/home/
$remote_ssh_username
$remote_ssh_password
"
>>
$FRIENDS_SERVERS_LIST
echo
"
$remote_ssh_username
@
$remote_ssh_domain
$remote_ssh_port
/home/
$remote_ssh_username
$remote_ssh_password
"
>>
$FRIENDS_SERVERS_LIST
remote_ssh_username
=
""
remote_ssh_domain
=
""
remote_ssh_port
=
""
...
...
@@ -206,7 +206,7 @@ function interactive_configuration_remote_backups {
entering_remote_backups_ctr
=
$((
entering_remote_backups_ctr
+
1
))
fi
else
echo
"
$remote_ssh_username
@
$remote_ssh_domain
:
$remote_ssh_port
/
/home/
$remote_ssh_username
$remote_ssh_password
"
>>
$FRIENDS_SERVERS_LIST
echo
"
$remote_ssh_username
@
$remote_ssh_domain
$remote_ssh_port
/home/
$remote_ssh_username
$remote_ssh_password
"
>>
$FRIENDS_SERVERS_LIST
remote_ssh_username
=
""
remote_ssh_domain
=
""
remote_ssh_port
=
""
...
...
@@ -216,7 +216,7 @@ function interactive_configuration_remote_backups {
entering_remote_backups_ctr
=
$((
entering_remote_backups_ctr
+
1
))
fi
else
echo
"
$remote_ssh_username
@
$remote_ssh_domain
:
$remote_ssh_port
/
/home/
$remote_ssh_username
$remote_ssh_password
"
>>
$FRIENDS_SERVERS_LIST
echo
"
$remote_ssh_username
@
$remote_ssh_domain
$remote_ssh_port
/home/
$remote_ssh_username
$remote_ssh_password
"
>>
$FRIENDS_SERVERS_LIST
remote_ssh_username
=
""
remote_ssh_domain
=
""
remote_ssh_port
=
""
...
...
This diff is collapsed.
Click to expand it.
src/freedombone-restore-remote
+
3
−
1
View file @
46e0aba9
...
...
@@ -70,7 +70,9 @@ fi
REMOTE_SERVER
=
$(
grep
-i
"
$SERVER_NAME
"
$BACKUP_LIST
|
awk
-F
' '
'{print $1}'
)
REMOTE_SSH_PORT
=
$(
grep
-i
"
$SERVER_NAME
"
$BACKUP_LIST
|
awk
-F
' '
'{print $2}'
)
REMOTE_PASSWORD
=
$(
grep
-i
"
$SERVER_NAME
"
$BACKUP_LIST
|
awk
-F
' '
'{print $3}'
)
REMOTE_DIRECTORY
=
$(
grep
-i
"
$SERVER_NAME
"
$BACKUP_LIST
|
awk
-F
' '
'{print $3}'
)
REMOTE_PASSWORD
=
$(
grep
-i
"
$SERVER_NAME
"
$BACKUP_LIST
|
awk
-F
' '
'{print $4}'
)
REMOTE_SERVER
=
$REMOTE_SERVER
:
$REMOTE_DIRECTORY
NOW
=
$(
date
+
"%Y-%m-%d %H:%M:%S"
)
...
...
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