Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Ccache backup restore
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
gangstervano
n00b
n00b


Joined: 15 Aug 2016
Posts: 74

PostPosted: Sat Sep 24, 2016 2:46 pm    Post subject: Ccache backup restore Reply with quote

Hi!

Can I somehow make a backup ccache data and then restore it?

Let's create a tar arhih folder /var/tmp/ccache?

Backup and recovery is expected on the same PC.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21724

PostPosted: Sat Sep 24, 2016 3:16 pm    Post subject: Reply with quote

You could, but why do you need to? Caches are expected to store only results that can be regenerated if the cache is cleared. Path /var/tmp/ccache is where object files from Portage builds are stored. You probably do not need to preserve those.
Back to top
View user's profile Send private message
gangstervano
n00b
n00b


Joined: 15 Aug 2016
Posts: 74

PostPosted: Sat Sep 24, 2016 5:10 pm    Post subject: Reply with quote

Hu, thank you for your reply :)

This is in order not to carry out a full compilation, when you restore old disk image with gentoo.

For example, I restore an image that does not have some of the programs.
These programs have already been compiled.

I restores ccache. Then compile program. As a result, I quickly regained the program that were not on the disk image.

I did not understand Is there enough to save the folder /var/tmp/ccache or not?

Excuse me for my english :(
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21724

PostPosted: Sat Sep 24, 2016 5:19 pm    Post subject: Reply with quote

Would it not be better to backup and restore the programs themselves, rather than some of the objects used in the program?
Back to top
View user's profile Send private message
gangstervano
n00b
n00b


Joined: 15 Aug 2016
Posts: 74

PostPosted: Sat Sep 24, 2016 5:23 pm    Post subject: Reply with quote

The folder takes up less space and is more versatile. Besides, I do not know exactly what I want to restore the program, and which are not.

Besides, for me it is too difficult to understand how to save separate program. :(


Last edited by gangstervano on Sat Sep 24, 2016 5:26 pm; edited 1 time in total
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Sat Sep 24, 2016 5:23 pm    Post subject: Reply with quote

To use a ccache image who was created in the pass with your today system, you need the same system configuration today than in the past. For example, if the Gcc version in the past is lower than today, or Emerge version and/or configuration is different, I would not use such an image.

In all situations, I would not use a ccache backup image. Maybe ccache would just overwrite the data but, not using a ccache backup is a source less of problem causes to think of when come the time to debug something.
_________________
Paul
Back to top
View user's profile Send private message
gangstervano
n00b
n00b


Joined: 15 Aug 2016
Posts: 74

PostPosted: Sat Sep 24, 2016 5:31 pm    Post subject: Reply with quote

I assume that the configuration will be the same.

I have a script that saves all the configuration files that I have changed.

Versions of gcc also remain the same.

On this basis there may save and then restore ccache?

I'm realizing that it's some risk.
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Sat Sep 24, 2016 5:45 pm    Post subject: Reply with quote

I use ccache. I have read somewhere that Ccache and be a source of compilation fails or someting like this. I need to search the forum to retrace the thread. Everything compile fine on my side with Ccache for the moment.
_________________
Paul
Back to top
View user's profile Send private message
gangstervano
n00b
n00b


Joined: 15 Aug 2016
Posts: 74

PostPosted: Sat Sep 24, 2016 5:55 pm    Post subject: Reply with quote

What ccahe can cause problems written in the handbook and I know it.

The question is whether there is the ability to save data ccache?
And followed by reduction them with the "ideal" conditions.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum