Horje
shell script backup distant Code Example
shell script backup distant
#regarder le contenu d'une archive.tar sans en extraire
tar -tf /emplacement_archive/archive.tar
Source: pub.phyks.me
shell script backup distant
#Rajouter file dan tar
tar -rvf /emplacement_archive/archive.tar /emplacement_fichier/fichier_a_ajouter
Source: pub.phyks.me
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\n" >> /tmp/My_ftp_backup.log
done




Shell

Related
ls list only first 10 files Code Example ls list only first 10 files Code Example
libthai0:i386 depends on libdatrie1 (>= 0.2.0); however: Package libdatrie1:i386 is not configured yet. Code Example libthai0:i386 depends on libdatrie1 (>= 0.2.0); however: Package libdatrie1:i386 is not configured yet. Code Example
can't locate automatic page generator button in github Code Example can't locate automatic page generator button in github Code Example
update arch on terminal Code Example update arch on terminal Code Example
linux ssh server Code Example linux ssh server Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8