npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

synchly

v1.1.0

Published

A CLI to automate database backups

Downloads

11

Readme

Synchly backups

version Node Version Documentation License: Apache-2.0

Description

Automate database backups with customizable recurring schedules.

Features

  • Backup scheme - Synchly uses a Grandfather-father-son backup rotation scheme (daily, weekly, monthly) that is fully customizable. Default schedule: 7 dailies + 8 weeklies + 6 monthlies (at max there will be 21 backups at a given instant).
  • Flexible scheduling - Schedule the daily backups to fit your maintenance and development schedule, so that you get a clear picture of your database backups over time.
  • Supported Databases
    • MySQL
    • MongoDB
  • Compression - Compress the database backups to save up space.
  • Cloud Storage Integration - Sync the local backups to remote storage of your choice.
  • Restoration - Restore the database from the backups.
  • Supported remote storages
    • Google Drive
    • SFTP
  • Status notifications - Get daily status reports for successful and failed backups, delivered when you want them via SMTP to the specified email(s). Check Usage and the List of Options below.
  • Multiple Backup Jobs - Run multiple backup jobs in parallel.
  • Encrypt Config files - Encrypt job configuration files.
  • Multiplatform Support - Run on any platform (Linux, Windows, macOS) which can run Node JS.

Prerequisites

  • node >=8

Installation

The Synchly CLI is distributed as an NPM package. To use it, install it globally using:

npm install --global synchly

or using yarn:

yarn global add synchly

Tab completion

The synchly package includes a useful tab-completion feature. This feature is installed automatically after the installation of the package. However, you might need to restart the console after installing the package for the autocomplete feature to work.

If you use Bash, it will create a file at ~/.synchly/completion.sh and append a loader code to ~/.bash_profile file.

If you use Zsh, it appends a loader code to ~/.zshrc file.

If you use Fish, it appends a loader code to ~/.config/fish/config.fish file.

Usage

$ synchly [--config module]
$ synchly [--config module] [--file filepath]
$ synchly [--disablejob] [--job exampleJob]
$ synchly [--disable module] [--debug]
$ synchly [--enablejob] [--job exampleJob]
$ synchly [--enable module] [--stacktrace]
$ synchly [--help]
$ synchly [--job exampleJob] [--config module]
$ synchly [--jobs]
$ synchly [--reset]
$ synchly [--restore]
$ synchly [--start]
$ synchly [--version]

Quick setup

Synchly can be run with --help flag to get a full list of flags.

The quickest way to get started is to run the synchly --config=db command.

To start synchly use the command synchly --start. Synchly instance have to be restarted everytime you make a change to the configuration using the cli options.

To restore database from the backup files use the command synchly --restore.

Configuration of modules (remote-sync and smtp) can be added or updated using synchly --config=module command. Initializing configurations can also be done using a file, synchly --config=module --file=filepath, refer Configuration using file.

By default, remote-sync and smtp modules are disabled, to enable them, use synchly --enable=module command.

To encyrpt the job configuration files use the command synchly --enable=cipher and to disable it globally use the command synchly --disable=cipher.

For the complete list of options and their behavior, refer List of options.

For running synchly as a daemon, refer Running as a deamon.

For creating multiple backup jobs, refer Running multiple jobs

List of options

Running as a daemon

Synchly can be run as a daemon, init.d and systemd unit files are bundled with the npm package to make this easier.

If installed using npm:

init.d

$ npm install --global synchly
$ sudo cp /usr/local/lib/node_modules/synchly/bin/synchly.conf /etc/init
$ sudo start synchly

systemd

$ npm install --global synchly
$ cp /usr/local/lib/node_modules/synchly/bin/synchly.service  ~/.config/systemd/user/
$ systemctl --user enable synchly
$ systemctl --user start synchly

If the unit files are not there inside /usr/local/lib/node_modules, use npm root -g to get the global installation root path and copy the unit files from there. The WorkingDirectory field in the synchly.service unit file also needs to be changed, if the global installation root path is different from /usr/local/lib/node_modules.

If installed using yarn:

If installed using yarn global, the service init files will be located on

  • /usr/local/share/.config/yarn/global/node_modules/synchly/bin/ - if logged in as root
  • ~/.config/yarn/global/node_modules/synchly/bin - if logged in as non-root

NOTE: Don't forget to restart the daemon everytime you make a change to the configuration using the cli options.

Examples

Contributing

I'd love your help! If you have ideas for new features or feedback, let me know by creating an issue in the issues list.

Show your support

Give a :star: if this project helped you!

License

Copyright :copyright: 2020 Hariprasanth S

This project is licensed under the Apache License, Version 2.0 You may also obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0