New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tar backup exclude dir #103

Closed
a323870 opened this Issue Jan 19, 2019 · 13 comments

Comments

Projects
None yet
2 participants
@a323870
Copy link

a323870 commented Jan 19, 2019

Tar img non include dir /proc /lost+found /sys /dev /tmp /boot /run

I solved append /* at the end of --exclude

cmd="tar \
	$TAR_BACKUP_OPTIONS \
	$TAR_BACKUP_ADDITIONAL_OPTIONS \
	${zip} \
	${verbose} \
	-f $target \
	--warning=no-xdev \
	--numeric-owner \
	--exclude=\"$BACKUPPATH_PARAMETER/*\" \
	--exclude=\"$source/$log_file\" \
	--exclude='.gvfs' \
	--exclude=$devroot/proc/* \
	--exclude=$devroot/lost+found/* \
	--exclude=$devroot/sys/* \
	--exclude=$devroot/dev/* \
	--exclude=$devroot/tmp/* \
	--exclude=$devroot/boot/* \
	--exclude=$devroot/run/* \
	$EXCLUDE_LIST \
	$source"

@framps framps added the question label Jan 19, 2019

@framps

This comment has been minimized.

Copy link
Owner

framps commented Jan 19, 2019

Hello @a323870 ,

you are right. Without /* the contents of these directories is not saved. But all these directories are recreated during Linux boot so there is no need to save them.

What's the reason you want to save these directories? If you have a strong argument for this I will add an additional option to raspiBackup in next release.

@a323870

This comment has been minimized.

Copy link
Author

a323870 commented Jan 19, 2019

@framps

This comment has been minimized.

Copy link
Owner

framps commented Jan 19, 2019

Do you use the USB boot mode of your Raspberry and boot without any SD card?

@a323870

This comment has been minimized.

Copy link
Author

a323870 commented Jan 19, 2019

@framps

This comment has been minimized.

Copy link
Owner

framps commented Jan 19, 2019

Which OS do you use? Please provide the output of
cat /etc/os-release

@framps framps added possible bug and removed question labels Jan 19, 2019

@a323870

This comment has been minimized.

Copy link
Author

a323870 commented Jan 19, 2019

@framps

This comment has been minimized.

Copy link
Owner

framps commented Jan 19, 2019

Thank you very much for this information. I don't use tar backup on my Raspis but it's tested in the raspiBackup regression test and I'm wondering why this issue doesn't pop up there.

I have to investigate this further now.

@a323870

This comment has been minimized.

Copy link
Author

a323870 commented Jan 19, 2019

@framps

This comment has been minimized.

Copy link
Owner

framps commented Jan 19, 2019

If it can bu usful

Indeed 👍

@framps framps added bug and removed possible bug labels Jan 19, 2019

@framps

This comment has been minimized.

Copy link
Owner

framps commented Jan 19, 2019

Thank you very much you reported this valid issue. 👍

I just fixed it and decided to make it a new release 0.6.4.2 so everybody using raspiBackup will get notified to upgrade.

Just execute raspiBackup.sh -U to get the latest release.

@framps framps self-assigned this Jan 19, 2019

@a323870

This comment has been minimized.

Copy link
Author

a323870 commented Jan 19, 2019

@framps

This comment has been minimized.

Copy link
Owner

framps commented Jan 20, 2019

Fixed in 0.6.4.2

@framps framps closed this Jan 20, 2019

@framps

This comment has been minimized.

Copy link
Owner

framps commented Jan 20, 2019

@a323870 I appreciate you created this issue and helped to find the root cause 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment