Skip to content

devnla/backup-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Server Backup with rsync

This program is used to backup your server's data like uploaded images by using rsync.

Installation

Install the project with python

    git clone https://github.com/devnla/server-backup.git
    cd server-backup
    cp .env.example .env
    pip install -r requirements.txt

Usage

Run the program to make a backup

    python server-backup.py backup

Run the program to display logs

    python server-backup.py log {number of logs}

Run the project in cron job daily

    0 0 * * * /usr/bin/python3 /path/to/server-backup.py backup

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

SERVER - IP or Host of the server

PORT - Port of the server

SSH_TYPE - password or private key

SSH_USER - username of the server

SSH_PASS - password of the server

SSH_KEY_PATH - path of the private key

REMOTE_DIR - directory on the remote server

LOCAL_DIR - directory on the local machine

LOG_FILE - path of the log file

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages