Tiny Core Linux

Off-Topic => Off-Topic - Tiny Core Lounge => Topic started by: xor on August 31, 2021, 08:08:12 AM

Title: DD command used to backup; Is it backing up useless garbage!?
Post by: xor on August 31, 2021, 08:08:12 AM
DD command used to backup; the shadow permission of the unnecessary deleted file on the drive is also backing up!?

if the answer is yes;

what is the command to exclude deleted files from image file!?
Title: Re: DD command used to backup; Is it backing up useless garbage!?
Post by: lhaley42 on August 31, 2021, 09:15:40 AM
do you mean the /usr/bin/backup command (which is /usr/bin/filetool.sh -b) because if so, those tools use tar and gzip to coalesce and compress the backed up content - and logically so - in its reading off the filesystem the data involved.

dd permits access at a more physical level - copying the underlying image of the source - and yes, as such, that would include free blocks as well as in use blocks - because - they're all just blocks.
Title: Re: DD command used to backup; Is it backing up useless garbage!?
Post by: Rich on August 31, 2021, 07:23:03 PM
Hi xor
The  dd  command has no concept of files, directories, file systems, ownership, or permissions. It copies bytes
of data from point A to point B in a sequential manner.
Title: Re: DD command used to backup; Is it backing up useless garbage!?
Post by: xor on August 31, 2021, 10:53:37 PM
Is there an action that can be done for unnecessary garbage file traces before the dd operation!?
Title: Re: DD command used to backup; Is it backing up useless garbage!?
Post by: Greg Erskine on September 01, 2021, 12:13:00 AM
$ rm garbage.file
Title: Re: DD command used to backup; Is it backing up useless garbage!?
Post by: Rich on September 01, 2021, 07:18:20 AM
Hi xor
It sounds like you want to remove the empty spaces left behind due to files being deleted.

cp -a  your files someplace safe.
Delete the original files.
cp -a  your files back to their original location.

You files contents should now occupy sequential blocks and their should be no empty spaces between files.