Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

shell script backup distant

#!/bin/sh
USERNAME="user"
PASSWORD="pass"
SERVER="123.456.78.90"
DATE="`date +%Y-%m-%d`"
BACKUPDIR="/${DATE}/accounts/"

find . -type f -name "*.tar.gz" -exec basename {} ; |
  while read filename ; do 
    ftp -inv $SERVER >> /tmp/My_ftp_backup.log <<EOF
user $USERNAME $PASSWORD
cd $BACKUPDIR
binary
put $filename
EOF
    echo -e "$date copied $filename
" >> /tmp/My_ftp_backup.log
done
Comment

shell script backup distant

#regarder le contenu d'une archive.tar sans en extraire
tar -tf /emplacement_archive/archive.tar
Comment

shell script backup distant

#Rajouter file dan tar
tar -rvf /emplacement_archive/archive.tar /emplacement_fichier/fichier_a_ajouter
Comment

PREVIOUS NEXT
Code Example
Shell :: dash_install 
Shell :: web server not running due to lack of necessary permissions in linux nginx 
Shell :: which display manager is active/running 
Shell :: termbin 
Shell :: view in linux 
Shell :: git log only folder 
Shell :: git merge branch in jenkins pipeline 
Shell :: copy file from windows to linux permission denied wsl 
Shell :: disable dashboardmac 
Shell :: microstack connect to mysql server 
Shell :: wasmtime 
Shell :: how to reove bash varible from memory 
Shell :: sending to git 
Shell :: quit while loop bash 
Shell :: cpanel install jpegoptim 
Shell :: grep global configuration 
Shell :: sublime text 3 terminal 
Shell :: how to reslove Jira Software is licensed but not currently installed 
Shell :: install onedrive in ubuntu 18.04 
Shell :: github timeago 
Shell :: color git 
Shell :: wevtutil query event id 
Shell :: Configure NFS Write Performance 
Shell :: batch file to install multiple programs 
Shell :: stern watch service logs 
Shell :: shell keep newline at output 
Shell :: linux directory structure 
Shell :: rclone on windows 
Shell :: arch linux turn on wifi 
Shell :: k logs 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =