He/גיבוי

From GnuCash
Revision as of 10:24, 31 March 2021 by Avma (talk | contribs) (קובצי נתונים)
Jump to: navigation, search
שפות אנגלית גרמנית ספרדית עִברִית פורטוגזית צרפתית

כללי

חשוב מאוד לגבות את נתוני גנוקאש על מנת להגן ולהבטיח את המידע הכספי שלכם מפני כשל בציוד או השחטה אפשרית של מסד הנתונים.

גנוקאש לא מספקת שירותי גיבוי ישירים בגין כשל מסוג זה. שחזור נתונים והתאוששות במקרה של כשל בציוד תלוי בתהליך גיבוי יציב הכולל אחסון עותקי גיבויים עדכניים באתר חיצוני ומרוחק כמו למשל להעלות קובצי גיבוי לאחסון בענן או להחזיק עותקי גיבוי על גבי התקן USB. מומלץ מאוד ליישם תהליכי גיבוי כאלה.

קובצי נתונים

קביעת סוג קבצי הנתונים של גנוקאש תלויה בסוג רכיב השרת בו נעשה שימוש לאחסון נתוני הספרים.

XML (ברירת מחדל)
בכל פעם שמבצעים שמירה בגנוקאש, מתבצע גם גיבוי מקומי של קובץ הנתונים. על מנת לבצע שמירה, יש להקיש על סמל השמירה בסרגל הקלים או לבחור באפשרות שמירה מאפשרות התפריט 'קובץ > שמירה' או, לחלוםין, על ידי הגדרת שמירה אוטומטית בתפריט 'עריכה > העדפות'. הגיבוי נעשה ידי שינוי שם קובץ הנתונים הנוכחי שבשימוש, בתוספת חותמת תאריך שעה לשם הקובץ ומתן סיומת 'gnucash.' חדשה.

לדוגמה: אם קובץ הנתונים נקרא MyAccounts.gnucash, קובץ הגיבויים עשוי להיקרא MyAccounts.gnucash.20140131150812.gnucash.

SQL
בעבודה עם מסד נתונים SQL, גנוקאש שומר באופן אוטומטי כל שינוי בזמן העובדה על הספרים. מסיבה זו, לא נוצרים קבצי גיבוי בעבודה עם שרת SQL. לתשומת לב, למרות שלא נוצרים קבצי גיבוי אוטומטיים בעת שימוש בשרת SQLite, גנוקאש עדיין יפיק קבצי '.log' עם שינויים האחרונים. למרות שבאופן תיאורטי ייתכן וניתן יהיה לבצע הרצה מחדשת של קבצי הלוג על גבי קובץ נתונים SQL, מהלך כזה אינו נתמך באופן רשמי ובמקרים מסוימים אף עלול להשפיעה השפעה שלילית. במקרה של אובדן נתונים, אפשרות אחת תהיה להמיר את קובץ נתוני ה- sqlite לקובץ בתבנית XML, להריץ את קובצי ה- '.log' ואז לשמור שוב את הקובץ בתבנית SQLite.

למידע נוסף נא לעיין בקישור לתקל שדווח ובו נידנונים סוגיות בהקשר זה.

SQLite3
You should use a timed backup program to copy your account file in some way, or make manual file copies.
MySQL or Postgresql
You should perform backups on the database in accordance with the recommended best practices appropriate to the server. We're not competent to advise you about this beyond recommending that you make backups.

As noted above, it is strongly recommended that whatever backup plan you use includes a provision for offsite backups. Imagine a fire in your home. A good option is one of the many cloud storage services like DropBox, Google Drive, or Carbonite. Those are just popular examples; there are dozens of such services, and we can make no recommendation of one over another.

There is a free 3rd party tool for creating GnuCash backups called BackupGnuCash. See Published_tools.

Related Files

Of course, you should save your actual data files, although it is up to you whether you save the backup and log files (.gnucash or .xac, .log). See above for more on the subject.

In addition to the actual data file, however, there are a number of files that store your preferences, user interface settings, and saved reports. It is advisable to back these resources up as well.

Configuration Locations identifies the OS-dependent locations of all the different files, as well as their names.

Additional information you need to save includes general configuration data, preferences data, theming data, and online banking settings.

General Configuration data
Gnucash 3.0 and newer
The contents of GNC_DATA_HOME and GNC_CONFIG_HOME.
Gnucash 2.x and older
Linux
HOME/.gnucash - most of your preferences, adjusted report settings, column withs, window positions, etc.
Windows
HOME\.gnucash
MacOS
HOME/Library/Application Support/Gnucash
Preferences data
Preferences from Edit->Preferences (like history, sign reversals, auto save interval, etc.) are stored using GSettings (for GnuCash 2.6 and newer) or GConf (for GnuCash 2.4 and older).
GSettings
Linux and similar
GSettings uses dconf as backend. You can use the dconf tool to dump all the preferences:
dconf dump /org/gnucash/
Windows
Gsettings uses the Windows registry as backend. You can make a backup of the HKEY_CURRENT_USER\Software\GSettings\org\gnucash\ registry key using the regedit command (Registry Editor).
MacOS
GSettings uses the system's native defaults. You can use the defaults tool to dump all the preferences:
defaults read -app Gnucash
GConf
The GConf settings are stored in HOME/.gconf/apps/gnucash/
Online Banking data
If you are using AqBanking online banking, the stored settings are placed in a specific folder.
Linux and MacOS
HOME/.[aq]banking holds your online banking settings. In older versions it was named .banking but .aqbanking is the current name.
Windows
HOME\aqbanking
Theming Data
If you
made changes to the GTK configuration (settings.ini or gtk.css) or
have installed custom themes and/or icon themes
you may want to back up the contents of the following directories as well: GTK_DATA_HOME, GTK_CONFIG_HOME, USER_CONFIG_HOME/themes and USER_CONFIG_HOME/icons.
For Gnucash 3.x GTK3 or
older versions GTK2 have more info on when these directories are used.

שחזור מגיבוי

שחזור קובץ נתונים הוא מהלך פשוט ביותר. כל שנדרש לעשות זה לפתוח את מנהל הקבצים, לעבור למחיצה בה מאוחסנים קובצי הנתונים של גנוקאש, להסיר את הקובץ הפגום, לשנות את שם אחד מקבצי הגיבוי לשם הקובץ המקורי (הפגום שזה עתה הוסר), ולאתחל את גנוקאש. לחלופין, מתוך תפריט גנוקאש, לבחור באפשרות 'קובץ > פתיחה' ולבחור את קובץ הגיבוי הרצוי מתוך מבחר הקבצים שבמחיצה. לתשומת לב: בעת אתחול, גנוקאש תמיד תפתח את הקובץ שנפתח לאחרונה (ככל שקיים כזה). זה עשוי להיות חשוב במידה ואתם נוהגים לפתוח קבצי ספרים שונים.

כדי לשחזר מגיבוי שנמצא אתר מרוחק,כל שנדרש לעשות הוא פשוט להעתיק את הקובץ המרוחק חזרה למחיצה בה נמצא קובץ המקור הפגום המקור ואז לפעול על פי ההנחיות שלעיל.

מק OS

במחשבי מקינטוש, לא ניתן לפתוח קובץ גנוקאש רק על ידי הקשה עליו. בניגוד למקובל בדרך כלל בישומי מק, גם גרירת ושחרור קובץ 'gnucash.' מעל ליישום גנוקאש לא יגרום לקובץ להפתח. גנוקאש תפתח *תמיד* את קובץ הנתונים האחרון שהיה בשמוש.

כדי להחליף קבצים במק, יש להשתמש באפשרות פתיחת קבצים מתפריט, לבחור באפשרות 'קובץ -> פתיחה' ולנווט לקובץ הגיבוי בו מעונינים להשתמש.