-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfiles.sh
executable file
·54 lines (42 loc) · 1.2 KB
/
files.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
# @summary Migrade files to a diferent server. Or just a simple backup
#
# @description ...
# Copy files.conf.dist to files.conf and make your customizations
#
# @author Bernardo Donadio <[email protected]>
# @author Emerson Rocha Luiz <[email protected]>
# @copyright Copyright (C) 2016 Alligo Ltda. All rights reserved.
CONFIGURATION=${1:-"./files.conf"}
source $CONFIGURATION
DATETIME=$(date +"%Y-%m-%d-%H-%M")
# files_localdump
#
# $1 = BACKUP_FILES_DESTINY
# $2 = BACKUP_FILES_NAME
# $3 = BACKUP_FILES_EXCLUDE
# $4 = BACKUP_FILES_SOURCE
# $2 = BACKUP_FILES_NAME
files_localdump() {
tar -cpzf ${BACKUP_FILES_DESTINY%+(/)}"/"$BACKUP_FILES_NAME"_"$DATETIME".tar.gz" $BACKUP_FILES_EXCLUDE $BACKUP_FILES_SOURCE
#echo "@todo finish"
}
files_localrestore() {
echo "@todo finish"
}
files_remotedump() {
echo "@todo finish"
}
files_remoterestore() {
echo "@todo finish"
}
move_local2remote() {
echo "@todo finish"
}
move_remote2local() {
echo "@todo finish"
}
# Command to just make a local copy
#tar -cpzf ${BACKUP_FILES_DESTINY%+(/)}"/"$BACKUP_FILES_NAME"_"$DATETIME".tar.gz" $BACKUP_FILES_EXCLUDE $BACKUP_FILES_SOURCE
files_localdump
echo "@todo finish me"