WaffleSyrup
Usage
WaffleSyrup runs in the current working directory. It will create ./tmp
directory to save tarballs which includes archived files. So you need to obtain proper permissions to cwd.
WaffleSyrup is a command line tool. Simply type wafflesyrup
in the console for help. The basic commands are:
wafflesyrup start
: Start backup.wafflesyrup version
: Displays the current running version of WaffleSyrup. Aliased as v.
Build from source
- Install go(1.17) from https://go.dev
- Download source or
git clone https://github.com/qroffle/wafflesyrup
- Change GOOS or GOARCH if you want to change OS or ARCH.
- Execute
./build.sh
on UNIX based OS,./build.bat
on windows. - Check the
./bin
directory for generated binary.
Configuration
First, you need to create config.json
which contains configuration data. You can simply start with renaming config.json.example
to config.json
.
Backups
config.json
has one backups
array, which contains some backup sets. Each backup item must contain name
, directories
, savepoints
and can contain postscripts
.
{
"backups": [
{
"name": "example",
"directories": [],
"savepoints": [],
"postscripts": []
}
]
}
Directories
directories
has array-typed value, that can contain some backup directory information. Each directory must contain path
and can contain excluded
array.
{
"directories": [
{
"path": "/home/example/cute_waffle",
"excluded": [
"node_modules/",
".git"
]
}
]
}
Savepoints
savepoints
has array-typed value, that can contain some backup destination information. Each savepoint must contain driver
, identity
. Each driver should get another structures of identity. Show details at Supported Drivers
{
"savepoints": [
{
"driver": "sftp",
"identity": {}
}
]
}
LMAO https://ubuntuforums.org/archive/index.php/t-825400.html
Postscripts
Currently unavailable.
Supported Drivers
WaffleSyrup supports two drivers.
sftp
sftp
requires host
, port
, username
, password
fields at identity
.
{
"driver": "sftp",
"identity": {
"host": "127.0.0.1",
"port": "22",
"username": "bitchchecker",
"password": "has_joined_#stopHipHop"
}
}
gdrive
gdrive
requires credentialFile
, folderId
fields at identity
. Credential files can be obtained from https://console.cloud.google.com.
Gdrive requires oauth tokens.
WaffleSyrup will give you some authentication links, and ask you the token. After receives, WaffleSyrup create ./tokens/ directory and will save tokens into.
{
"driver": "gdrive",
"identity": {
"credentialFile": "./credentials/client_secret_xxx.apps.googleusercontent.com.json",
"folderId": ""
}
}