Backup Strategy Not Working

silver.bullet at zoho.com silver.bullet at zoho.com
Fri Jul 31 20:51:53 UTC 2015


On Fri, 31 Jul 2015 19:37:53 +0100, Graham Watkins wrote:
>tar -cvpzf /media/graham/Expansion\ Drive/graham.tar.gz /home/graham 
>--exclude "/home/graham/VirtualBox VMs"

That's quasi how I make my backups too. I never run into an
issue, restoring from a backup always worked.

When the backup is finishes I usually log the exit status, but I'm doing
this mainly because my scripts often exit with a shutdown.

Usually I also open the archives with a GUI to test if it works.
Sometimes just the Archive GUIs are broken, using another GUI or using the
CLI works.

What "Archive Manager" do you use? Did you test another one too? If you
can open the archive from command line, then likely the GUI software is
broken.

That's how my scrpts usually backup:

  [snip]
  SUFFX=.bak.tar.gz
  [snip]
  cd /mnt/$BACKUP && tar -czf $FPATH$BACKUP$NAME$SUFFX *
  echo "exit status: $?" >> $LOG
  [snip]

Since I'm doing it with root privileges, the --preserve-permissions
option isn't needed. Regarding globbing the asterisk is a little bit
tricky. It also might be better not to use capital letters, to avoid
conflicts with environment variables. However, it's quasi the same
command as the one you run. There's nothing wrong with it.

I guess the --exclude option cares for patterns behind a slash and the path
is ignored, but I might be mistaken.

I never added a path:

$ grep exclude bak*
bak_q_arch:#tar --exclude=winOS.vdi --exclude=systemd.vdi -czf $BACKUP_DIR_Q/arch_home_$BACKUP_NAME_ADD.bak.tar.gz *
bak_u.pre_arch:#tar --exclude=winOS.vdi -czf $BACKUP_DIR_Q/archlinux_no_vdi_$BACKUP_NAME_ADD.bak.tar.gz * .chuser

Regards,
Ralf





More information about the ubuntu-users mailing list