I use a variant of the simple script below from the Community Ubuntu Documentation described
tar -cvpzf backup.tar.gz --exclude=/backup.tar.gz --exclude=/proc --exclude=/lost+found --exclude=/sys --exclude=/mnt --exclude=/media --exclude=/dev /
I used it again on Ubuntu 12.04 and I saw some files from the /run being skipped by the script.
I am trying to create a tar backup script.
Hi,
I'm trying to run a command from an ubuntu howto page, but there's something wrong with it that i dont understand?
Can you point it out please?
Thanks
root@nnjond-desktop:/# tar -cvpzf backup.tar.gz -exclude=/backup.tar.gz --exclude=/proc --exclude=/lost+found --exclude=/sys --exclude=/mnt --exclude=/media --exclude=/dev /
Everything I read says that to exclude .svn and .htaccess and other hidden files when creating a tar archive, use the --exclude=".*" pattern.
When I try, I get an empty archive. When I leave out the --exclude long option everything gets archived.
Here's the full command I'm using:
tar -czvf ../_migrate/archive_2012-05-07.tgz --exclude=".*" ./*
I need to comment the lines starting with pattern "exclude" or "exclude=". If the work exclude comes at any other part, ignore it. Also, ignore, excludes, excluded etc.
I need to comment the lines starting with pattern "exclude" or "exclude=". If the work exclude comes at any other part, ignore it. Also, ignore, excludes, excluded etc.
I have two hard drives--a system drive and a data drive. The path to the data drive is /storage. Following this post, I went to the root of my filesytem and executed the following command:
tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys --exclude=/storage /
Note that I excluded the data drive (--exclude=/storage) from the backup.
I want to restore a complete tar backup of Ubuntu 12.04 with all my customizations, documents, installed software, etc. to a different machine.
I want a simple and working (multiple) exclude option inside my rsync command.