Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# USER AND TARGET DIRECTORY
user=youruser
backups=/your/chosen/backup/directory/plex_backups
# SOURCE DIRECTORY FOR BACKUP
SOURCE_DIR='/your/source/directory'
if [[ $EUID > 0 ]]
@sinbadsalmon
sinbadsalmon / nextcloud-snap-backup.sh
Last active February 16, 2019 14:07 — forked from Refhi/nextcloud-snap-backup.sh
Nextcloud 13 snap backup script - A fork of the original script. This script creates an encrypted archive of the backup and then uploads it to an FTP server of your choosing. I use gpg with keys, see the gpg man pages for information on using this. FTP elements of script inspired by https://gist.github.com/pixeline/0f9f922cffb5a6bba97a. All othe…
#!/bin/bash
user=youruser
backups=/your/chosen/backup/directory
# FTP LOGIN
FTPHOST='ftp://host.domain.something'
FTPUSER='username'
FTPPASSWORD='password'
@sinbadsalmon
sinbadsalmon / mirror_local_directory_to_remote_directory_(mirror -R)
Last active July 14, 2019 10:52 — forked from pixeline/mirror_remote_directory_to_local_directory
Bash script using lftp to mirror local directory to remote directory, thus keeping the remote directory synchronized with the local one. This script uses mirror -R.
#!/bin/sh
# @author: Simon Tipping
# @description: A script to mirror local folder to distant folder using lftp - Based on Alexandre Plennevaux's "MIRROR DISTANT FOLDER TO LOCAL FOLDER VIA FTP" script https://gist.github.com/pixeline/0f9f922cffb5a6bba97a
#
# FTP LOGIN
HOST='sftp://ftp.domain.com'
USER='ftpusername'
PASSWORD='ftppassword'
# DISTANT DIRECTORY