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

node-backup-lamp

v1.0.3

Published

Small backup util that backups from /etc: - apache2 config - php5 config from /var/www/: - * executes: - mysqlCmd and stores that as sql.gz

Downloads

18

Readme

node-backup

Small backup util that backups from /etc:

  • apache2 config
  • php5 config from /var/www/:

executes:

  • mysqlCmd and stores that as sql.gz

gets configured via config.js

Usage

Install

# As Root
apt-get install npm
npm install -g n
n latest
mkdir -p ~/.backup-config
cp /usr/local/lib/node_modules/node-backup-lamp/config.example.js ~/.backup-config
# Edit and Adjust your config read the create config section or copy existing to ~/.backup-config

Backup

node-backup

Restore

//node-backup-restore
sftp [email protected]
cd sftpPath/
ls
#find directory
get directory
exit
cd directory
tar xfz *.tar.gz
mv apache2 /etc
mv php5 /etc
mv www /var/www
#import the mysql.sql.gz into your mysql server use the same that u used for mysqlCmd but run mysql instead like
#The database must exist you can create it via phpMyAdmin or the Install
mysql -u USER -pPASSWORD -h HOST DB < mysql.sql.gz

Create Config

Edit ~/.backup-config/config.js

var date = new Date().toISOString();
module.exports = {
  sftp: {
    host: 'hostname.xxx.tld',
    port: '22',
    username: 'user',
    password: 'pass'
  },
  sftpPath: '/backups/'+date+'/',
  mysqlCmd: 'mysqldump -u USER -pPASSWORD -h HOST DB | gzip -f && exit 0'
};