Kategorien
Linux

Tar Archive , Backups – Exclude Directories


tar -cvzpf backup.tar --exclude=vendor --exclude="logs/" --exclude="tmp/" /var/www/your/project/

-c … create Archive
-v …and show me
-z …compress that
-p …take over all permissions
-f …to folder

Unpacking

tar -xzf archiv.tar.gz -C /home/verzeichnis1/archiv_verzeichnis

-x ...extract archive
-z ...that compressed  
-f ...to folder

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert