Exemple #1
0
void cntr_print(struct cntr *cntr, enum action act)
{
	int x=0;
	time_t now=time(NULL);

	border();
	logc("Start time: %s\n", getdatestr(cntr->start));
	logc("  End time: %s\n", getdatestr(now));
	logc("Time taken: %s\n", time_taken(now-cntr->start));
	if(act==ACTION_BACKUP
	  || act==ACTION_BACKUP_TIMED)
	{
	  logc("% 18s % 9s % 9s % 9s % 9s % 9s |% 9s\n",
	    " ", "New", "Changed", "Unchanged", "Deleted", "Total", "Scanned");
	}
	if(act==ACTION_RESTORE
	  || act==ACTION_VERIFY)
	{
	  logc("% 18s % 9s % 9s |% 9s\n",
	    " ", "", "Attempted", "Expected");
	}
	if(act==ACTION_ESTIMATE)
	{
	  logc("% 18s % 9s % 9s %9s\n",
	    " ", "", "", "Scanned");
	}
	table_border(act);

	for(x=0; x<cntr->colen; x++)
		quint_print(cntr->ent[(uint8_t)cntr->cmd_order[x]], act);

	table_border(act);
	bottom_part(cntr, act);

	border();
}
Exemple #2
0
void cntr_print(struct cntr *cntr, enum action act)
{
	struct cntr_ent *e;
	time_t now=time(NULL);

	border();
	logc("Start time: %s\n", getdatestr(cntr->start));
	logc("  End time: %s\n", getdatestr(now));
	logc("Time taken: %s\n", time_taken(now-cntr->start));
	if(act==ACTION_BACKUP
	  || act==ACTION_BACKUP_TIMED)
	{
	  logc("% 18s % 9s % 9s % 9s % 9s % 9s |% 9s\n",
	    " ", "New", "Changed", "Unchanged", "Deleted", "Total", "Scanned");
	}
	if(act==ACTION_RESTORE
	  || act==ACTION_VERIFY)
	{
	  logc("% 18s % 9s % 9s |% 9s\n",
	    " ", "", "Attempted", "Expected");
	}
	if(act==ACTION_ESTIMATE)
	{
	  logc("% 18s % 9s % 9s %9s\n",
	    " ", "", "", "Scanned");
	}
	table_border(act);

	for(e=cntr->list; e; e=e->next)
		quint_print(e, act);

	table_border(act);
	bottom_part(cntr, act);

	border();
}
Exemple #3
0
void print_filecounters(struct cntr *p1c, struct cntr *c, enum action act)
{
	time_t now=time(NULL);
	if(!p1c || !c) return;

	border();
	logc("Start time: %s\n", getdatestr(p1c->start));
	logc("  End time: %s\n", getdatestr(now));
	logc("Time taken: %s\n", time_taken(now-p1c->start));
	if(act==ACTION_BACKUP
	  || act==ACTION_BACKUP_TIMED)
	{
	  logc("% 18s % 9s % 9s % 9s % 9s % 9s |% 9s\n",
	    " ", "New", "Changed", "Unchanged", "Deleted", "Total", "Scanned");
	}
	if(act==ACTION_RESTORE
	  || act==ACTION_VERIFY)
	{
	  logc("% 18s % 9s % 9s |% 9s\n",
	    " ", "", "Attempted", "Expected");
	}
	if(act==ACTION_ESTIMATE)
	{
	  logc("% 18s % 9s % 9s %9s\n",
	    " ", "", "", "Scanned");
	}
	table_border(act);

	quint_print("Files:",
		c->file,
		c->file_changed,
		c->file_same,
		c->file_deleted,
		p1c->file,
		act);

	quint_print("Files (encrypted):",
		c->enc,
		c->enc_changed,
		c->enc_same,
		c->enc_deleted,
		p1c->enc,
		act);

	quint_print("Meta data:",
		c->meta,
		c->meta_changed,
		c->meta_same,
		c->meta_deleted,
		p1c->meta,
		act);

	quint_print("Meta data (enc):",
		c->encmeta,
		c->encmeta_changed,
		c->encmeta_same,
		c->encmeta_deleted,
		p1c->encmeta,
		act);

	quint_print("Directories:",
		c->dir,
		c->dir_changed,
		c->dir_same,
		c->dir_deleted,
		p1c->dir,
		act);

	quint_print("Soft links:",
		c->slink,
		c->slink_changed,
		c->slink_same,
		c->slink_deleted,
		p1c->slink,
		act);

	quint_print("Hard links:",
		c->hlink,
		c->hlink_changed,
		c->hlink_same,
		c->hlink_deleted,
		p1c->hlink,
		act);

	quint_print("Special files:",
		c->special,
		c->special_changed,
		c->special_same,
		c->special_deleted,
		p1c->special,
		act);

	quint_print("EFS files:",
		c->efs,
		c->efs_changed,
		c->efs_same,
		c->efs_deleted,
		p1c->efs,
		act);

	quint_print("VSS headers:",
		c->vss,
		c->vss_changed,
		c->vss_same,
		c->vss_deleted,
		p1c->vss,
		act);

	quint_print("VSS headers (enc):",
		c->encvss,
		c->encvss_changed,
		c->encvss_same,
		c->encvss_deleted,
		p1c->encvss,
		act);

	quint_print("VSS footers:",
		c->vss_t,
		c->vss_t_changed,
		c->vss_t_same,
		c->vss_t_deleted,
		p1c->vss_t,
		act);

	quint_print("VSS footers (enc):",
		c->encvss_t,
		c->encvss_t_changed,
		c->encvss_t_same,
		c->encvss_t_deleted,
		p1c->encvss_t,
		act);

	quint_print("Grand total:",
		c->total,
		c->total_changed,
		c->total_same,
		c->total_deleted,
		p1c->total,
		act);

	table_border(act);
	bottom_part(p1c, c, act);

	border();
}
Exemple #4
0
void print_filecounters(struct cntr *p1c, struct cntr *c, enum action act, int client)
{
	time_t now=time(NULL);
	if(!p1c || !c) return;

	border();
	logc("Start time: %s\n", getdatestr(p1c->start));
	logc("  End time: %s\n", getdatestr(now));
	logc("Time taken: %s\n", time_taken(now-p1c->start));
	logc("% 22s % 9s % 9s % 9s % 9s |% 9s\n",
	  " ", "New", "Changed", "Unchanged", "Total", "Scanned");
	table_border();

	if(act==ACTION_RESTORE)
	{
		restore_print("Files:", c->file);
		restore_print("Files (encrypted):", c->enc);
		restore_print("Meta data:", c->meta);
		restore_print("Meta (encrypted):", c->encmeta);
		restore_print("Directories:", c->dir);
		restore_print("Soft links:", c->slink);
		restore_print("Hard links:", c->hlink);
		restore_print("Special files:", c->special);
		restore_print("EFS files:", c->efs);
		restore_print("Grand total:", c->total);
	}
	else if(act==ACTION_VERIFY)
	{
		restore_print("Verified files:", c->file);
		restore_print("Verified files (enc):", c->enc);
		restore_print("Verified meta data:", c->meta);
		restore_print("Verified meta (enc):", c->encmeta);
		restore_print("Verified directories:", c->dir);
		restore_print("Verified soft links:", c->slink);
		restore_print("Verified hard links:", c->hlink);
		restore_print("Verified special:", c->special);
		restore_print("Verified EFS files:", c->efs);
		restore_print("Grand total:", c->total);
	}
	else
	{
		quint_print("Files:",
			c->file,
			c->file_changed,
			c->file_same,
			p1c->file,
			client?FORMAT_CLIENT_DATA:FORMAT_SERVER);

		quint_print("Files (encrypted):",
			c->enc,
			c->enc_changed,
			c->enc_same,
			p1c->enc,
			client?FORMAT_CLIENT_DATA:FORMAT_SERVER);

		quint_print("Meta data:",
			c->meta,
			c->meta_changed,
			c->meta_same,
			p1c->meta,
			client?FORMAT_CLIENT_DATA:FORMAT_SERVER);

		quint_print("Meta data (encrypted):",
			c->encmeta,
			c->meta_changed,
			c->meta_same,
			p1c->encmeta,
			client?FORMAT_CLIENT_DATA:FORMAT_SERVER);

		quint_print("Directories:",
			c->dir,
			c->dir_changed,
			c->dir_same,
			p1c->dir,
			client?FORMAT_CLIENT_NODE:FORMAT_SERVER);

		quint_print("Soft links:",
			c->slink,
			c->slink_changed,
			c->slink_same,
			p1c->slink,
			client?FORMAT_CLIENT_NODE:FORMAT_SERVER);

		quint_print("Hard links:",
			c->hlink,
			c->hlink_changed,
			c->hlink_same,
			p1c->hlink,
			client?FORMAT_CLIENT_NODE:FORMAT_SERVER);

		quint_print("Special files:",
			c->special,
			c->special_changed,
			c->special_same,
			p1c->special,
			client?FORMAT_CLIENT_NODE:FORMAT_SERVER);

		quint_print("EFS files:",
			c->efs,
			c->efs_changed,
			c->efs_same,
			p1c->efs,
			client?FORMAT_CLIENT_NODE:FORMAT_SERVER);

		quint_print("Grand total:",
			c->total,
			c->total_changed,
			c->total_same,
			p1c->total,
			client?FORMAT_CLIENT_DATA:FORMAT_SERVER);
	}

	table_border();
	bottom_part(p1c, c, act);

	border();
}
Exemple #5
0
static void restore_print(const char *msg, unsigned long long count)
{
	quint_print(msg, 0, 0, count, 0, FORMAT_CLIENT_RESTORE);
}