Backup not showing moved files

22 views
Skip to first unread message

aeron...@gmail.com

unread,
Mar 28, 2024, 9:46:05 AM3/28/24
to bareos-users
I have a full backup of my files where one directory is in the wrong
place. I moved the directory to the correct location in my directory
structure. The incremental after that did backup the moved directory but
did not show any of the files or directories in the moved directory in
the new location. A restore of that directory only created the directory
and none of the sub files or sub directories. I believe when I do the
next full backup in July, this situation should be corrected but should
it have backed up all of the files in this moved directory or should
this be considered a bug to be reported?

Job {
  Name = "Photos"
  Level = Incremental
  Storage = "Photos-storage"
  Pool = "Photos"
  Client = "Photos-fd"
  FileSet = "Photos Set"
  Schedule = "6MOW4_Cycle"
  JobDefs = "Unscheduled_Common_Attributes"
  Priority = 11
}

JobDefs {
  Name = "Unscheduled_Common_Attributes"
  Type = Backup
  Messages = "Standard"
  WriteBootstrap = "/var/lib/bareos/%c.bsr"
  MaximumConcurrentJobs = 7
  AllowMixedPriority = yes
  AllowDuplicateJobs = no
  CancelLowerLevelDuplicates = yes
  CancelQueuedDuplicates = yes
}

Philipp Storz

unread,
Mar 28, 2024, 10:13:11 AM3/28/24
to bareos...@googlegroups.com
Hello,

Am 28.03.24 um 14:46 schrieb aeron...@gmail.com:
> I have a full backup of my files where one directory is in the wrong place. I moved the directory to
> the correct location in my directory structure. The incremental after that did backup the moved
> directory but did not show any of the files or directories in the moved directory in the new
> location. A restore of that directory only created the directory and none of the sub files or sub
> directories. I believe when I do the next full backup in July, this situation should be corrected
> but should it have backed up all of the files in this moved directory or should this be considered a
> bug to be reported?

This is the normal behaviour if you move files in the filesystem. As the incremental backup checks
the timestamps of the files to determine if they need to be backed up or not, and the timestamps of
the files in the moved directory are not touched, the files will not be backed up.

You can use "accurate" backup mode to also handle this situation, please see
https://docs.bareos.org/Configuration/Director.html#config-Dir_Job_Accurate

In accurate mode, not only the timestamp is considered, but the whole filelist of the previous
backup is sent over to the filedaemon and compared to what is currently in the filesystem.

Another quick solution for your problem would also to "touch" all files in the moved directory so
that the incremental backup will pick up those files.




>
> Job {
>   Name = "Photos"
>   Level = Incremental
>   Storage = "Photos-storage"
>   Pool = "Photos"
>   Client = "Photos-fd"
>   FileSet = "Photos Set"
>   Schedule = "6MOW4_Cycle"
>   JobDefs = "Unscheduled_Common_Attributes"
>   Priority = 11
> }
>
> JobDefs {
>   Name = "Unscheduled_Common_Attributes"
>   Type = Backup
>   Messages = "Standard"
>   WriteBootstrap = "/var/lib/bareos/%c.bsr"
>   MaximumConcurrentJobs = 7
>   AllowMixedPriority = yes
>   AllowDuplicateJobs = no
>   CancelLowerLevelDuplicates = yes
>   CancelQueuedDuplicates = yes
> }
>
t
--
Mit freundlichen Grüßen

Philipp Storz philip...@bareos.com
Bareos GmbH & Co. KG Phone: +49 221 63 06 93-92
http://www.bareos.com

Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
Geschäftsführer: Stephan Dühr, Jörg Steffens, Philipp Storz

Reply all
Reply to author
Forward
0 new messages