You are not logged in.

#1 2013-05-18 02:41:12

Registered: 2013-02-18
Posts: 7

Backup of /home and /var at shutdown

Hi all

   for a few months now, I installed archlinux on a usb key, so I could have my linux with me everywhere. I know that writing to a key is slow (really slow) and my system freeze for a few seconds often. I came across this site :

   Very interesting and it would really speedup my linux. I wish to use tmpfs for /home and /var. So my question is : what would be the best way to backup those directory at shutdown. The fastest way to minimize shutdown and boot time. Boot time is not critical, but I'd like a shutdown as fast as possible (but no need for insta-shutdown tho).

   I tried to search for an answer, but didn't find a complete solution. I could tar the directories (tgz) but its slow at shutdown. I found rsync too, which would be a good thing to update the directory to backup at shutdown.

So what I think would be good (if feasible) is :

copy directory image to tmpfs (/home)

mount directory image to tmpfs(/backup/home)
update backup image (rsync /home to /backup/home)
compress backup image and copy to rw partition (remount / or mount a specific partion for this)

rsync would be good, because only a few files would be copied, so its faster.
having a (compressed) image would be faster (I think) to write on the key than multiple small files (thats why I would do this in ram instead of on disk)

Or maybe, if we can mount an iso, modify the files and directory (in tmpfs) and put the changes to the iso file at shutdown only (or on-demand) that would be good too.

So has an idea of how to achieve this ?

Thank you

P.s.: This is not a system to work or to be reliable. I know that, if the computer turns off (power cut or something) I loose everything on ram. This is mainly for the fun of having a linux anywhere smile


Board footer

Powered by FluxBB