-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
now retention can be set, destination folder and the config is integr…
…ated in one file
- Loading branch information
Showing
11 changed files
with
449 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.0.0 | ||
2.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
# | ||
# config.yaml - configuration file for google-drive-backup | ||
# | ||
|
||
# | ||
# reporting: the implemented method for reporting is send an email, | ||
# and here are the configuration data | ||
# | ||
reportEmail: | ||
emailFrom : "YOUR GOOGLE EMAIL ACCOUNT HERE" | ||
emailTo : ["A LIST OF EMAILS TO NOTIFY, CAN BE LEFT EMPTY"] | ||
# template of the "success" notification email, customize to suit your | ||
# needs/language. The placeholders {day} and {hour} will be replaced | ||
# by the day and hour of the copies, in day/month format. | ||
emailSuccess : | ||
subject : "OK: Copia de seguridad realizada con éxito el {day} a las {hour}" | ||
body: > | ||
Hola caraguapa: | ||
El {day}, a las {hour} se ha realizado con éxito la copia de seguridad. | ||
{report} | ||
{backupPolicyExplanation} | ||
Saludos, | ||
El robot más caraguapa del mundo | ||
emailFailure : | ||
subject : "FAIL: Copia de seguridad HA FALLADO {day} a las {hour}" | ||
body: > | ||
Hola caraguapa: | ||
Me temo que se ha producido un error en la copia de seguridad planificada para el día {day} a las {hour}. | ||
El error que ha aparecido es: | ||
{error_description} | ||
Posiblemente la copia no se haya realizado. Conviene echar un vistazo cuanto antes. | ||
Saludos, | ||
El robot más caraguapa del mundo | ||
# | ||
# resources to backup configuration section | ||
# | ||
|
||
# do you need to do do something before or after | ||
# the copies are made??? -like run a script to collect | ||
# the backup copies, or stop a website or something like that- | ||
# if so, you can configure it here | ||
runBefore : ["/home/rluna/wkpy/google-drive-backup/data/database_backup.sh"] | ||
runAfter : [] | ||
|
||
# the list of directories to backup (must NOT END in "/") | ||
resourcesToBackup : | ||
- "../data" | ||
|
||
# Set this value to "true" if you want to | ||
# verify the uploaded files | ||
verifyUploadedFiles : true | ||
|
||
|
||
|
||
# | ||
# backup policies | ||
# | ||
# by default, three different policies can be configured: daily, monthly | ||
# and yearly. The "daily" copies are made each day, and are stored in the | ||
# indicated folder (in this example in the folder 01_diarios). Not all days | ||
# are saved, only the last X days. That X is set in the retention. For | ||
# instance, if you set a retention of 3, only 3 copies will be stored. | ||
# | ||
backupPolicy: | ||
destinationFolder : "backup" | ||
daily : | ||
folder: "01_daily" | ||
# how many different copies do you want to keep | ||
retention : 3 | ||
monthly : | ||
folder: "02_monthly" | ||
# | ||
# yearly: | ||
# folder: "my_yearly_copies" | ||
# retention: 10 # keep 10 years of copies | ||
# | ||
|
||
|
||
# | ||
# config info for credentials.jsonfile | ||
# | ||
# you have to recover this information from google | ||
# cloud console, after creating your own application | ||
# | ||
installed: null | ||
|
||
|
||
# | ||
# logging configuration: can be omitted if you want | ||
# | ||
logging: | ||
version: 1 | ||
formatters: | ||
formatter1: | ||
format: "%(asctime)s %(levelname)-8s %(message)s" | ||
datefmt: "%Y-%m-%d %H:%M" | ||
handlers: | ||
handler1: | ||
class: "logging.handlers.RotatingFileHandler" | ||
encoding : "utf-8" | ||
filename : "drive-backup.log" | ||
# 1 Mb | ||
maxBytes : 1024000 | ||
backupCount : 3 | ||
formatter: formatter1 | ||
loggers: | ||
rotatingFileLogger: | ||
level: DEBUG | ||
handlers: [ "handler1" ] | ||
root: | ||
handlers : [ "handler1" ] | ||
level : DEBUG | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.