l

linux

Last active 3 months ago ai ai-generated bash compress linux mkv mp4 video

Created by ChatGPT, but not the first comment section.

0 0 1
1 #!/usr/bin/env bash
2
3 ##########################################################################
4 #
5 # This bash script was written by ChatGPT, but not this comment section.
6 # Everything works after testing, but not 2 functions:
7 # - Adding metadata to compressed MP4 file.
8 # - Checking if the file has already been compressed by this script.
9 #
10 # However, I have done some fine tuning like adding new rows.
Last active 3 months ago backup linux

This script backups everything from the server besides of the excluded folders.

0 0 1
1 #!/bin/bash
2 REMOTE_USER="user"
3 REMOTE_HOST="111.111.111.111"
4 REMOTE_PORT="11"
5 REMOTE_PATH="/"
6 LOCAL_PATH="/path/to/folder"
7
8 rsync -avhzr --delete --progress --rsh="ssh -p${REMOTE_PORT}" "${REMOTE_USER}@${REMOTE_HOST}:${REMOTE_PATH}" --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/swapfile","/boot/*"} "${LOCAL_PATH}"