Prompt
stringlengths
14
160
Instruction
stringlengths
18
2k
Response
stringlengths
8
2k
Batch-file: how to backup all .doc files to a folder
I have this small script that is intended to backup all *.doc files in the folder into a _z subfolder. I have just noticed it does not work properly, when _ is part of the filename of the *.doc that is supposed to be backed up. Could anyone kindly explain to me the source of the issue and perhaps advice on how to corr...
Currently you are telling it to copy everything up to the underscore, if one exists, else it will create one if it does not. That way the text after underscore is ignored. try a for loop @echo off mkdir "_z">nul 2>&1 for %%i in (*.doc) do copy "%%~i" "_z\%%~ni_%date:/=-% %time::=-%%%~xi"
Restore encrypted Backup in SQL
I use this code USE master; GO CREATE MASTER KEY ENCRYPTION BY PASSWORD = '1234'; GO CREATE CERTIFICATE Cer WITH SUBJECT = 'Hello'; GO and then backup database with this code backup database Temp to disk = 'D:\Backup\temp.bak' WITH COMPRESSION, ENCRYPTION ( ALGORITHM = AES_256, ...
The master key is used to protect the certificate used for the backup encryption. The certificate is unique - specifying same name for executing the CREATE CERTIFICATE statement creates different certificate. If this was not true, everyone with access to your backup would be able to decrypt it. So, you need to export ...
cpanel backup 'cpbackup-exclude.conf' exclude all files except .php and .js [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about programming within the scope defined in the help center. Closed 2 years ago. ...
0 Had to search it myself, but to exclude all ".jpg" files from backup, use this line: *.jpg Do that for every file type / extension, 1 for each line. Source: Link to Source Share Improve this answer Follow ...
Backup an external drive to an external drive - windows 10 [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by prog...
0 I came across "AOMEI Backupper". It does the job, and actually did save me from losing 6 months of work (from home). However, I ended up just buying a bigger SSD and backing up to an external SSD (so I have a portable copy if needed). AOMEI works, but is a little "rough a...
Error: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data cpanel backup restore
i have been trying to restore my home directory backup for a while now but i keep getting this error Error: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data it is a .tar.gz file. I don't know what to do. Please help with an answer.
0 I've encountered the same problem and I am currently researching for a solution. I created a backup from CPanel at SiteGround and attempting to move it over to GoDaddy via CPanel restore. Share Improve this answer Follow ...
WinSCP - SFTP script to backup the newest files
I have call recordings on AWS but I'm only given 10 GB of space so I would like to have a script which will SFTP to the Amazon AWS and only copy the newest files to my NAS sitting in the office. I can than use Windows Task Scheduler to run the scripts once a week. The idea is that after all space on AWS is populated i...
The easiest solution is to use get command with -neweronly switch: open sftp://user:[email protected]/ get -neweronly /remote/path/* C:\local\path\* For a very similar results, you can also use synchronize command: synchronize local /remote/path C:\local\path If you want to synchronize only recent files, you can ad...
Backup Jenkins log folder via ThinBackup
I want to backup all .log* files under $JENKINS_HOME/logs via thinBackups Backup additional files Feature. Folder structure is as follows: /var/lib/jenkins/logs/ |-- health-checker.log |-- slaves | |-- Slave\ 1 | | `-- slave.log | |-- Slave\ 2 | | `-- slave.log | `-- Slave\ 3 | `-- slave.log `-- ta...
0 I think this plugin is buggy when it comes to include and exclude regex. If you exclude .*xml it shouldn't backup any files ending in xml but some files (not all) are still backed up. Share Improve this answer Follow ...
MySql take backup of recently updated/inserted data
I have database of size 500mb, to take backup it is taking huge time to take full dump file, I just want to know is there any way we can take backup queries for date between from and to date-times, so that I can take back in particular time interval. I know we can take whole db backup using `$ > mysqldump -u username ...
You can use the --where option for mysqldump to take a subset of rows. For example: mysqldump --where "updated_at > '2020-06-14 00:00:00'" ...other options... However, this will add that WHERE condition to each table it dumps. So you must have an updated_at column in every table. MySQL does not require such a column ...
How to create a batch that creates a directory named the current date and time, and then copy files in it?
I have to seperate codes. This creates a directory with only the date, but i don't know how to put the time on the end. for /f "tokens=1* delims=" %%a in ('date /T') do set datestr=%%a mkdir c:\%date:/=% And I have this to copy the files: robocopy "%appdata%\saves" "C:\Users\redfi\OneDrive\Savesbackup" /e /xf They b...
0 I managed to figure it out. You might need to edit the date formats. echo off set CUR_YYYY=%date:~0,4% set CUR_MM=%date:~5,2% set CUR_DD=%date:~8,2% set CUR_HH=%time:~0,2% if %CUR_HH% lss 10 (set CUR_HH=0%time:~1,1%) set CUR_NN=%time:~3,2% set CUR_SS=%time:~6,2% set CUR_...
Sanity.io backup and restore (or auto-saving doc IDs)
Question #1: is it possible to restore deleted items from backup in Sanity.io? To my understanding, restoring a backup is done by exporting all documents from a dataset's history, and importing it. Restore - there's one way to do it: https://www.sanity.io/docs/importing-data. Export - there're two ways to export data...
I saw that the Sanity.io project has a webhook that gets triggered when changes occur (under 'Settings' tab --> 'API' sub-tab). I guess this could be set to call a service that gets all documents and save their ID with the current timestamp.
Azure Backups Failing Due To Possible MARS Agent DLL Issue
We are running Microsoft Azure Backup Server (MABS) v3 on Windows Server 2019. Since Monday evening the cloud and bare-metal backups started failing, but other on-premises backups are running fine. Looking through Event Viewer we found an application error which might assist in resolving the issue, but I haven't been ...
0 I'm not exactly sure why, but the cause of the issues was the latest version of Sysinternals' Sysmon, version 11.0. This also caused another issue where Office documents would take long to open or save from and to network locations, even when the client had a gigabit co...
Backup of Azure SQL Database to Recovery Services vault
I'm trying to figure out if there is a way to backup Azure SQL Databases (Not SQL on Azure VMs) to a service vault or a blob storage outside of the resource group the databases is located in. So far I have not found any resources on the topic. Can anyone confirm that this is not possible?
Yes, it's possible. The easiest way is that you could using Export to backup the database to blob storage outside of the resource group the databases is located in On portal. For example: Export: Export database: Choose the blob storage out of the resource group which the databases is located in: For more details, ...
How to perform differential or incremental snapshot and how it works?
I want to know that how can I take differential snapshots in ElasticSearch and also how it works? We received around 30 GB of data monthly in all indices of ElasticSearch. Few indices get update daily and few indices data get purge after certain retention days. So I was thinking to go with incremental snapshot so that...
All snapshots to a single repository are incremental. You will not have to do anything specifically to take differential snapshots. If you just take snapshots to the same repository, each snapshot will try to reuse as much data as possible from prior snapshots automatically. For more details: https://discuss.elastic.c...
Transaction Log Backup fails with "Exclusive access could not be obtained because the database is in use"
I am attempting a Log Shipping failover test and the step which is intended to put the database into restoring mode is failing with the error "Exclusive access could not be obtained because the database is in use". The action was carried out through SSMS selecting "Transaction Log" and also selecting "backup the tail ...
0 A log backup that leaves the target database in RESTORING is called a "Tail Log Backup". And taking the database offline requires terminating all other connections to the database. Like this: use testdb go alter database testdb set single_user with rollback immediate go...
How to do automated postgres database backups in google app engine for django app?
I have a Django app running in standard Google App Engine, using postgres SQL. I am using Google Cloud SQL (postgres) with Google App Engine. How do I backup database everyday at 2am, and save the .sql file in Google Storage Bucket? I want to run a daily cron to save db snapshot in one of the buckets. Using django-ex...
0 Checkout the below link. https://cloud.google.com/sql/docs/postgres/import-export/exporting It describes how you can use the gcloud command or rest API to export your database in SQL dump or CSV format and save it to Cloud Storage. Internally, it uses pg_dump, which is t...
Artifactory Failed to export , Binary provider has no content
When trying to backup or export the JFrog Artifactory, the backup folder is created. But the System log shows multiple errors like: 2019-12-23 17:31:07,026 [art-exec-5] [ERROR] (o.a.r.d.i.DbExportBase:123) - Failed to export '/data/backups/20191223.172751.tmp/repositories/repo1.maven.org-cache/org/apache/httpcomponent...
0 This error is printed when the actual binary file is missing from the Artifactory storage location (by default, $ARTIFACTORY_HOME/data/filestore/). You shouldn't be able to download the same artifact (repo1.maven.org-cache/org/apache/httpcomponents/project/7/project-7.pom...
What are some subtle problems that can cause the restoration of a backup to fail?
There is a lot of research about why backup fail but I have trouble to find good resource about why backup recovery fail. Have you ever experienced recovery fail ? What are subtle issue you didn't anticipate (environment change, storage unavailability, permission, media malfunctions,...) ?
0 Here is a non-exhaustive list of problems that could compromise the restoration of data: Human error (probably the most common mistake) Wrong backup configuration Wrong business data target Backup software failure breaking change between version internal error at resto...
scp backup a path with variables folders
I´m going to try explain my requirement for this backup. I supose it´s so easy but for me not because i don´t use to work with linux. Scenario. With a server linux via SCP i want to get from my firewall the daily logs. The firewall storage it´s logs in /StoneSoft/StoneGate/data/storage/Firewall/year2019/month09/day25/...
0 save following text as a backup_arch.sh #!/bin/bash yearXXXX=${1:-2019} monthXX=${2:-09} dayXX=${3:-25} hourXX=${4:-07} destination=backup/$yearXXXX/$monthXX/$dayXX/$hourXX/ mkdir -p $destination scp /StoneSoft/StoneGate/data/storage/Firewall/$yearXXXX/$monthXX/$dayXX...
Not able to configure TFS backup on TFS2013 environment
We have setup of TFS2013, earlier backup was configure on this server some how backup location does not exist. I would like to change the backup location. I followed below steps: a) Started TFS Admin Console. b) Clicked on Reconfigure Scheduled Backup c) Modified path and followed steps of wizard. d) I am stuck on bel...
According to your screenshot, there is a Warning mark followed Reporting Key Step. If your deployment uses reporting, you will be prompted for a password in order to back up the encryption key for reporting. The backups will be encrypted using the key for which you are required to provide a password that is at ...
Can I simply copy the mysql database folder in /var/lib/mysql/ to backup the database?
As mentioned in the subject, my question is whether I can simply copy the mysql database folder in /var/lib/mysql/ to backup the database? Would this cause issues anyhow? Obviously the idea is to add the backup folder back into the server in case of data loss. Thanks in advance. Regards.
seem you can if your purpose it's to restore quickly mysql installation but i don't know exactly how much feasible could be in terms of space compared to simples automatic procedure for backup . ( you have a lot of alternative , for example with crontab you can see this crontab )
Gitlab-CI backup lost by restarting Docker desktop
I have a docker desktop installed on my windows pc. In that, I have self-hosted gitlab on one docker container. Today I tried to back up my gitlab by typing the following command: docker exec -t <my-container-name> gitlab-backup create After running this command the backup was successful and saw a message that backup...
0 If you started your container using Volumes, try looking at C:\ProgramData\docker\volume for your backup. The backup is normally located at: /var/opt/gitlab/backups within the container. So hopefully you mapped /var/opt/gitlab to either a volume or a bind mount. ...
How to get all Kubernetes Objects details
I am implementing a snapshot solution for my K8s cluster. I already have a way of getting a consistent snapshot of all the services (persistent volumes) that are running. So I don't need to snapshot persistent volumes for that matter. But I am looking for a way to get all K8s config at the time of taking the snapshot....
0 Yes, Valero can be used to get the only the required object from k8s. I strongly suggest checking this video. Share Improve this answer Follow answered Aug 15, 2019 at 18:13 FL3SHFL3SH 3...
Sql backup to url - azure blob differential
I have a v large dB 250 gb and I have backed up to azure blob using the below... BACKUP DATABASE [TestDB] TO URL = 'https://cloudspacestorage.blob.core.windows.net/backups/Testdb.bak' WITH CREDENTIAL = 'Backupcredential', STATS = 10 GO I now need to do it again is there a way I can do an differential backup e.g...
As Larnu said, you can Call the Differential Backups (SQL Server). Since you have full backup the database to you Azure Blob Storage with the satatements: BACKUP DATABASE [TestDB] TO URL = 'https://cloudspacestorage.blob.core.windows.net/backups/Testdb.bak' WITH CREDENTIAL = 'Backupcredential', STATS = 10 GO And fro...
New backups overwriting old backups in Linux Crontab
I am new to Linux. I am using CentOS 7. I found out that my new backup always replace my old backups. For example, backup on 15th of July 2019 will replace backup on 14th of July 2019. # Create archive filename. #day=$(date +%A) day=$(date -d "$D" '+%d') hostname=$(hostname -s) archive_file="$hostname-$day.tgz" Could...
Use a date, hour / minute in the name of your archive so it wont replace your old backup. day = $(date +%F %l:%M)" Adding all the fields (day, date, time and year) will help you to store all backups without overwriting any.
can't export using expdp, can't open log and more
I had been asked to create a table: '/u03/oracle/table/prac_tab.dbf' and import it to '/u04/backup' Now, my problem begins when i do the following code: [oracle@haranda ~]$ expdp paris dumpfile=parisbk1.dmp logfile=parisbk1.log full=y directory=paris_dir I had tried doing it in the /u03/oracle and other places, but ...
create or replace DIRECTORY paris_dir as '/u04/backup' valid only full path. Oracle does not verify directory when create.
Unity - Recover lost scene
I had been working on a scene for hours when mysteriously my computer completely crashes and needs to restart I remember having saved several times when working so I wasn't scared. As I thought I had lost only maybe just 1-5min of work, I re-open Unity and to my surprise, my scene seemed to have reverted to one of my...
See: https://docs.unity3d.com/Manual/UnityCollaborateRollback.html And: https://www.youtube.com/watch?v=hBDflmDFAxI These should give you all the info you need. I highly advise you to back up an export on a USB drive.
Nexus in docker container how to configer another server as backup location in the tasks?
I'm setting up Nexus as artifact manager for maven projects. I am using Nexus 3 in a docker container and I am trying to set a weekly backup as a task in the configuration area of Nexus. Unfortunately I cant find anything in the Nexus documentation about the options on how to set up the filesystem location for backup ...
0 If you've mounted a volume from your host to the nexus container you should be able to point your task configuration to the mounted volume from within the container. See this link for more details: https://help.sonatype.com/repomanager3/backup-and-restore/configure-and-ru...
How to add ~/.zshrc file into git?
I would like to create a backup of the .zshrc file in my ~/ directory and avoid versioning all other items. How to exclude all subdirectories and their content? For example: cd ~/subdirectory/ && git status should output: fatal: Not a git repository (or any parent up to mount point /) How to achieve this?
0 To exclude all excepted zhrc file (put in your .gitignore file): /* !.zhrc Share Improve this answer Follow answered Dec 11, 2018 at 14:24 Nicolas VoronNicolas Voron 2,95611 gold badge2...
How to get database backup using artisan command via controller code?
how to get DB backup via controller code using artisan command. I am using https://github.com/schickling/laravel-backup this package to backup/restore database. That package works fine in the terminal with this command php artisan db:back --database=mysql but when i try to execute via the controller code, it doesn't ...
0 // start the backup process Artisan::call('backup:run'); $output = Artisan::output(); // log the results Log::info("Backpack new backup started from admin interface \r\n" . $output); Share Improve this answer ...
How to back up PostgreSQL using vb.net
I have a problem. I want to ask you all about how to back up database from vb.net. I'm using PostgreSQL. Why I need back up database? Because it's too large to display all at datagridview when it's running. So for a time span, example 3 months, it's automatically backed-up. I always get Messagebox "Error at or near Ba...
You can't backup Postgresql use query as stated in comment by @jmcilhinney and the link to refer your question it's clear. In Postgresql Documentation there are no information about that too: Backup Use pg_dump or Backup But using pg_dump will give you a full sql file including all DDL and DML statements to recreate y...
The task with the name "Back Up Database Task" ... is not registered for use on this computer
I can't edit "Back Up Database Task", please help me. Sorry, I don't speak English very well. The task with the name "Back Up Database Task" and the creation name "Microsoft.SqlServer.Management.DatabaseMaintenance.DbMaintenanceBackupTask, Microsoft.SqlServer.MaintenancePlanTasks, Version=15.0.0.0, Culture=neutral, P...
0 Try to use SSMS 17, You can get it from provided URL: Download SQL Server Management Studio 17.9.1 Thank You Share Improve this answer Follow edited Dec 19, 2018 at 5:05 Ali Jamal 1,46111 gold badge...
Google Drive, auto delete files older than 7 days in specific folder
I'm using Google drive to store my daily made backup from my linux machine. But i need a script that auto delete's the files in a specific folder after 7 days. So that there are 7 backups in the folder. The file that get's backup is called world-$(date +%d-%m-%Y).tar.gz it replaces the %d %m and %Y with the day month ...
0 You'll want to use the REST API for Google Drive. There are official client libraries for several languages, listed here Authenticate your account via OAuth2. Depending on the client library you use, there are different tools to do this. I'm most familiar with the Python ...
Git like change and version management of complete machine
We have a Centos machine on which Jenkins is hosted. This Jenkins have lots of jobs and configurations of interconnected jobs. The problem is that if anytime we want to do a change in multiple jobs there is a risk of misconfiguration. So there should be a revert process so that we can revert back to older working ver...
0 You can just copy the files on JENKINS_HOME; A far better approach would be using thinBackup Using thinBackup you can restore and make a backup. Share Improve this answer Follow answered Aug ...
Automatically export a working copy from SVN
Let me start by saying we already backup the repository on the file system, I also create a dump of the repository which is also backed up. Just tested hotcopy and all it does is create a copy of the repository, which we already backup. I've been requested to create an automated export of working copies for all projec...
0 You can run the svn checkout command to checkout a working copy of your project and schedule to svn update to bring the working copy up to date with the repository's state. Alternatively, you can run svn export. You can use Windows Task Scheduler to automatically run your...
Sequence error postgres 9 to 10
I'm trying to migrate my PostgreSQL 9.6.3 to 10.4. The restore seems to work correctly on the data, but i'm losing the sequences. I'm having erros like: "Column 'min_value' does not exists", "Column not found in pgSet: last_values"... It seems that PG 10 has a different way of working with sequences. My question is: I...
0 You cannot do that without editing the dump from 9.6 before loading it. The correct way to upgrade a database with dump/restore is to use pg_dump or pg_dumpall from the v10 installation to perform the dump. That is the supported way. Share Improve this answer ...
DropIt how to copy pdf files from folder and subfolders
I installed the DropIt product to copy PDF files from the selected folder and its subfolders. I defined association : rule: **;*.pdf which means any subfolder and just PDF files). action: copy destination folder : c:\mybackup\%SubDir%\ I drag and drop a selected folder and drop it into DropIt's icon. Actually no fil...
0 Actually you can use only *.pdf and I assume it will already check all subfolder and process .pdf files. Share Improve this answer Follow answered Oct 17, 2018 at 18:47 Ahmet İnalAhmet İn...
How to make a backup/copy of .db file on android using python and kivy launcher
I have been trying to make an android app (via kivy launcher) that automatically makes a backup each time you save to a .db file. When running kivy on my pc, the program works perfectly, but when I use it on my phone via kivy launcher, the program just crashes. Interestingly, the next time I go into the kivy launcher,...
0 You can't use shutil.copy on android. Because "Error Operation not permitted"(Test on Galaxy A8 2018) I had a similar problem today with android kivy buildozer, I haven't had time to solve it, but I think this solution can be used: with open("filename", "rb") as f: ...
Dynamic Variable Name for backup table
I am trying to write a stored procedure to backup a table, but I keep getting: Msg 402, Level 16, State 1, Line 9 The data types varchar and datetime2 are incompatible in the add operator. Msg 402, Level 16, State 1, Line 15 The data types varchar and datetime2 are incompatible in the add operator. How can I fix...
You have to convert your date variable to a string so you can concatenate it: SET @CreateDynamicSQL='CREATE TABLE [dbo].[paul_AccountContact_Backup_' + convert(varchar(20), @SYSDATETIME, <Format>) + ']( Documentation for the format parameter: https://learn.microsoft.com/en-us/sql/t-sql/functions/cast-and-convert-tra...
Is it possible to keep files in glacier after deletion from s3?
Is it possible to move or copy files from s3 to glacier (or if not possible another cheaper storage class) although the original s3 files will be deleted? Looking for a robust solution for server backups from whm > s3 > glacier. I've trialled multiple lifecycle rules, and can see several questions have been asked arou...
There are actually two ways to use Amazon Glacier: As an Amazon S3 storage class (as you describe), or By interacting with Amazon Glacier directly Amazon Glacier has its own API that you can use to upload/download objects to/from a Glacier vault (which is the equivalent to an S3 bucket). In fact, when you use Amazon...
Programmatically packing 2TB of various sized files into folders of 25GB? (I used python, any language will be acceptable)
I have around 4,000 files of wildly different sizes that I am trying to back up as efficiently as is reasonably possible. I know compressing them all into a giant tarball and splitting evenly is a solution, but as I am using Bluray discs, if I scratch one section, I risk losing the whole disc's contents. I wrote a pyt...
I just brute forced it by going down the list, adding smaller and smaller files until I was out of files or the disk filled up, then repeat. By "mathematically required" I just meant size of all files / 25GB = ideal # of discs. I can post the resulting arrays on
postgreSQL backup tables and views
I want to have backup of my database, but using pgadmin III I can only restore tables, but I want my views be restored as well. Is there any way doing that? tnx
0 you could do this task with CLI, eg: -bash-4.2$ pg_dump -s $(psql -c "select string_agg('-t '||relname,' ') from pg_class where relkind='v' and relnamespace='public'::regnamespace" -At) | grep -i create CREATE VIEW avva AS CREATE VIEW v AS Of course without grep to get t...
Barman backup: Backup failed issuing start backup command
I have begun looking into using barman to perform my database backups however I have come across the following error: barman backup main-server This command gives the following result: ERROR: Impossible to start the backup. Check the log for more details, or run 'barman check main-server' When I then run: barman ...
0 First you have to activate the wal reception: barman receive-wal --create-slot main-server Then, in function of the version of barman you are using, the following can solve your problem: barman version < 2.2 barman switch-xlog --force --archive main-server barman versio...
How to backup postgresql database of rails project deploy on EC2
I need to backup postegresql database of rails project deployed on EC2 using Capistrano. So how can i do that and also i want to save backup data on my local computer
0 Easy way to find where you PG data located: run: ps aux | grep postgres | grep -- -D or ps ax | grep postgres | grep -v postgres than zip this folder(for example /var/postgres/9.5/data i have no idea where is on your server) run: sudo zip -r ~/9_5_postgres.zip /var/postg...
How to run grafical tool (e.g. deja-dup) as root on Ubuntu 17.10
When trying to setup automated backup under Ubuntu 17.10 using Deja-Dup I realized that one can not backup the root directory since a normal user starting the deja-dup application does not have all rights to access all files in /. (german discussion about rather similar situation can be found here: https://forum.ubunt...
0 Grant root access to deja-dup. sudo chown root:root /usr/bin/deja-dup sudo chmod u+s /usr/bin/deja-dup Give permission to it. sudo chmod 777 /usr/bin/deja-dup Please be aware that doing this exposes your system to risk, and it is strongly advised that you change the perm...
Issue with searching for strings in text in Powershell
I am building a script to monitor backups with Ahsay in PowerShell and have run into an issue with identifying backup types, it works by checking for certain keywords in the first few lines of the log file, and I want to have it so that if it contains the word "File List" but also contains the word "Database" it is no...
0 Not sure why your '-notlike' isn't working but I'm sure it has something to do with the way your String gets evaluated, it might be that it's an array of Strings instead of one complete String(depending on how you populate it). As an interim solution while I try it on my ...
bash backup script - pleskbackup + lftp
I would like to ask you for a help. I'm a scripting noob and I need to make a script for backing up our webserver via FTPS. I made this script, but it only makes the backup file, but it does not upload that file to the FTPS server. But when I run that lftp command alone, it works. I'm looking at this for quite a long ...
I had a problem with FTP FEAT and certificate. I disabled FEAT in lftp config file and I specified full path to the certificate. It works now.
postgresql pg_dumpall password error
postgresql 9.4 following this cheat sheet http://www.postgresonline.com/special_feature.php?sf_name=postgresql90_pg_dumprestore_cheatsheet&outputformat=html trying to backup here is my command C:\Program Files\PostgreSQL\9.4\bin>pg_dumpall -h arcserver -U postgres -w -p 5433 -f "R:\Data\LUCZ_2017\PostgreSQL_Backup\l...
0 pg_dumpall will try to dump the entire cluster (all databases that the engine serves). If you need this functionality, you probably only want to dump your lucz database (I'm assuming). Try using the -d option to specify the database to dump. For help: pg_dumpall --help ...
Android: File Extension Intent Filter does not work properly with GMail/Downloads app
I have an app where I am allowing users to backup data and want them to be able to click on the back up file via a File Manager, GMail, and the Downloads system app. I have defined the following intent in my manifest file... <intent-filter android:label="Simple Backup File" android:prio...
I got it working by putting content into its own intent-filter group along with a file data scheme, both having a mime-type of application/octet-stream. <intent-filter android:priority="999" > <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.ca...
Granting execute on function pg_start_backup in PostgreSQL does not work
ERROR: type should be string, got "\nhttps://www.postgresql.org/docs/9.6/static/functions-admin.html#FUNCTIONS-ADMIN-BACKUP-TABLE and https://www.postgresql.org/docs/9.6/static/continuous-archiving.html state that the function pg_start_backup(text, boolean, boolean) can be executed by a superuser or a user which has been granted execute right on the function.\nIn practice, this doesn't work, because the function is \"security invoker\". It would only work if it was \"security definer\". Page Create PostgreSQL 9 role with login (user) just to execute functions says \"functions must have been created with SECURITY DEFINER or this user will still be unable to execute them\", which is perfectly correct.\nWhat are the minimal rights I have to give a user on top of \"execute on function pg_start_backup\" in order to enable him to really execute the function?\n"
0 Funny enough, the user has to be granted the right to execute this system function in the database (s)he connects to. Although this is a system function identical in every database and doing only things at the cluster level, the right to execute it is saved separately in ...
Attach database with NORECOVERY
Is there a way to attach a SQL Server mdf/ldf files such that the database is in Restoring mode and we can restore log backups on top of it. I have a hardware array snapshot (crash consistent) that contains the mdf/ldf files. I need to attach these files to another SQL Server instance and then do log restores for a p...
No. Unfortunately. Vote for the feature here: DCR - Attach database with NORECOVERY
Ruby backup Gem s3 upload not working
I am testing the backup gem and the size of the db is very small. I have mongodb with me. My configuration is: Backup::Model.new(:backup_db, 'Backup for my db') do split_into_chunks_of 250 database MongoDB do |db| db.name = "my_dev" # db.username = "" # db.password = "" ...
0 I reconfigured the backup setup and now it is working fine. I don't know why this error came before. I used the following command to run the backup: $ backup perform --trigger my_backup The steps that I taken to get it work: I am using rbenv, I created .ruby-gemset a...
Creating a backup of a file with copy after_save, goes into endless loop
I wrote a code to run when user saves workbook, this code saves another copy, and then saves the original file again, to avoid leaving user editing the "backup" workbook. Once it saves the original file again, the "after_save" trigger is fired, and keeps saving to infinity. I checked for a solution here on StackOverFl...
To create an archive, you need to save the workbook when opening it, not at the end when the user is closing it. The code below takes care of this: Private Sub Auto_Open() Dim WoExt, Ext, BkPath, nDateTime As String On Error GoTo ErrorHandler: 'defining variables nDateTime = Format(Now, "YYMMDD") Ext =...
Azure blob storage backup
I wonder is there's an inbuilt way in azure to backup a blob account, or just a container if that can't be done. Looked into azure backup service but can't find the option for doing it, just options to backup VM. Alternatively I can write my custom back up strategy, but not sure if it's the case that I can't find that...
There is no blob backup facility. You'll need to make your own backups (e.g. making copies of blobs, either to the same storage account or a different one). You can take snapshots, but as @Gaurav points out in comments, snapshots are tied to the original blob, so if you delete the original, you delete the snapshots. I...
NGINX Upstream servers in order
I have an NGINX proxy with 4 upstream servers behind it, 2 local, 2 remote, this is to maintain the maximum failure tolerance possible. Now I can make it try each server in order with something like this upstream backend { server server1; server 127.0.0.1:8081 backup; } upstream fallback1 { server server2...
0 I would recommend that you merge your backups and primaries into a single consolidated entry - and also, to speed up subsequent requests, that you look into keepalives. This would prevent additional TCP handshake overhead. upstream backend { server server1; serve...
duplicity --exclude option doesn't exclude the mentioned dir
#!/bin/bash datetime="`date +%Y%m%d`"; export AWS_ACCESS_KEY_ID="MYKEY" export AWS_SECRET_ACCESS_KEY="MYSECRET" export BACKUP_DEST_FILES="s3://s3.eu-central-1.amazonaws.com/mybucket" cd /var/www/ dirs=($(find * -maxdepth 0 -type d)) for dir in "${dirs[@]}"; do cd $dir subdirs=($(find * -maxdepth 0 -type d)) for sub...
0 OK I excluded the unnecessary directories in subdirs=($(find * -maxdepth 0 ! -path /path/to/exclude -type d)) point. So the directories are being excluded during the step before duplicity process. Thank you. Share Improve this answer F...
How to use quotes in bash scrips when a command in the script needs quotes too?
I am attempting to make a script that will make a backup file of a video file in the same directory with the time stamp at the end of the tar file. The script is for demonstration purposes only, that is why I do not intend on sending the file to a different directory. Below is how far I have come with it. #!/bin/bas...
Given your goal to make an archive, presumably preserving owner, file modes, file flags and ACLs, if available, then this should do what you need: #!/bin/bash archive_name="Me.$(date +%d_%b_%Y-%k:%M:%S).tar.xz" $(cd Compression_Play/ tar -cvp 2017-03-23_01-13-02.avi | pixz -9t > $archive_name ) Based on the GitHu...
Duplicity backups with PGP fail: "Unusable public key"
I am trying to create an ansible role to automate backups. However, it fails with the error: Local and Remote metadata are synchronized, no sync needed. Last full backup date: none GPGError: GPG Failed, see log below: ===== Begin GnuPG log ===== gpg: ADD3F11Easdsdfs: skipped: public key not found gpg: [stdin]: encrypt...
0 Run gpg --version and /usr/bin/gpg --version and check whether they are the same. Duplicity might fall back to version 1.x.x, whereas your terminal might have an alias to invoke GnuPG version 2.x.x. In that case the key is created/imported with GnuPG 2, but GnuPG 1 might...
C program to consume MySQL API for backup? [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 7 years ago. ...
No, mysql does not provide any dpecific api to back a database up. Mysql does provide the mysqldump utility that can be called from the command line to back up a database and also provides a general C api to access a mysql server. The heneral api can be used to write your own backup program if you are unhappy with mys...
Export a job in postgres to an other database (productive system)
I have create a job via pgadmin in postgres. This is a test system. How can I export this job to a database on other computer (productive system)? Greets Benjamin
0 pgAgent stores data default in schema pgagent in database postgres. So you can dump and restore it. Share Improve this answer Follow answered Feb 24, 2017 at 17:31 Aleksandra AngielskaAle...
Bare bones Git repository with tracked files
I want to backup a Git versioned project, including the working directory changes, and a pointer to the remote repository. The backed-up folder should contain the working directory files, and needed .git files in order to allow the user to navigate to the project and run git pull (or another git command) safely. It do...
0 You can create: an archive of the working tree: zip -r myrepo.zip myrepo -x *.git* a bundle of the .git repo (as explained here): cd myrepo git bundle create /tmp/repositoryname.bundle --all That would give you two files (easier to copy over any location you want), wi...
Stop creation of .bak file
I back up database in .bak file: BACKUP DATABASE MyDatabase TO DISK='E:\MyDatabase.bak' How can I stop this process?
0 You can stop a running backup by using the kill YourProcessIDHere command. To identify the process to kill use sp_who command and look in the cmd column for backup command. More information can be found here: MSDN Kill Share Improve this answer ...
pgAdmin 4.1:Restoring backup failed but window's always open
few days ago I tried to restore a Postgres backup using pgAdmin 4.1. The restore process failed, so I did it again outside the tool, via command line. Now the problem is that a small blue window is still displaying at the right-down corner of my pgAdmin, remembering me that restoring failed with exit code -1, and t...
1 In case anyone is lookig for a solution I found the answer in the link below, but be careful because in my case it erased all my existing conenctions but the default one, besides that it works perfectly: SQL command to stop job in pgAdmin 4 Share Improve this an...
Bitname Gitlab backup and restore without stopping server
Currently we are doing the process of backup and restore as explained below: https://docs.bitnami.com/google/apps/gitlab/#how-to-create-a-full-backup-of-gitlab This requires stopping the server, specially for taking the backup. Is it possible to do backup and restore without stopping the server? How can I do this?
0 The risk of not stopping the server is that there's the risk that not all the changes in, for example, the Database, are written to disk correctly. Therefore, you could end up in an unstable state. If you really want to try, you can follow the exact procedure without the ...
Azure backup configuration - Change from Geo to Local (greyed out)
I'm using DPM to azure online backup and I want to change the redundancy from Geo to Local, but it's greyed out. Is there a way to change it? I don't want to create a new fault just for that, then I have to re-upload everything from DPM to azure again.
0 It's not possible to change after the initial configuration. If you want to change the configuration you have to rebuild the Backup vault and register the servers. I had the same issue at a customer in the past. Share Improve this answer ...
Using git bundle create to backup repos to a specific directory?
I am working on backing some git repos as part of a new back up plan. It seems git bundle is the way to go, but I am wondering, and in my, in all honesty, short google searches, I cannot seem to find out if I can do a bundle directly into a specific directory. For my SVN I mounted a cifs share, and pointed the dump d...
Back-uping a git repository is as simple as either: git clone --bare it to a new place. It allows to git push/pull for incremental backup. tar -czf backup.tar.gz myrepo/.git/ file and copy it somewhere. So you can manage it in a simple file, easily. It's easy.
Find and replace string in files recursively, create backup for affected files
I want to find and replace the string "foo" with "bra" in several files, traversing through directories (Linux machine). If a string is replaced in file "example.txt" I need that file to be copied to "example.text.old" before string replacement. I can replace the string is files recursively like this: find . -type f -...
0 I made this bash script replace.sh to make it easy for later reuse #!/bin/bash old=$1 new=$2 grep -r -l "$old" --exclude='*.{sh,old}' * | while read -r line ; do cp "$line" "$line.old" echo "Replacing '$old' with '$new' in file '$line'" sed -i "s/$old/$new/g" "$ don...
Can the encryption Keys stored in the Android's KeyStore be backed up?
When you encrypt the app's data stored on the device, it is recommended to use the KeyStore to generate and save the key Material used for the encryption. If the user wants to backup the app's internal storage, he can use adb backup or Google's Cloud Backup. That's what I have understood. But when the data is encrypte...
0 It will not work. This is very sad that Google force two things that don't work together. Keystore on Android doesn't have a backup option like Keychain on iOS. Your data will be backed up but after restoration, you will not have an option to decrypt it. You should use ...
performance issue until mongodump
we operate for our customer a server with a single mongo instance, gradle, postgres and nginx running on it. The problem is we had massiv performance problmes until mongodump is running. The mongo queue is growing and no data be queried. The next problem is the costumer want not invest in a replica-set or a software u...
As you have heavy load, adding a replica set is a good solution, as backup could be taken on secondary node, but be aware that replica need at least three servers (you can have an master/slave/arbiter - where the last need a little amount of resources) MongoDump makes general query lock which will have an impact if th...
ADB backup and pull commands create no files on PC
Android 5.1.1 on Sony Xperia Z1, not rooted ADB ("Minimal ADB and Fastboot") on Windows 8 Hello knowledgeable people, I am on the way to root my Xperia Z1 for the first time and am trying to use "Minimal ADB and Fastboot" to backup my phone using an ADB command like adb backup -apk -shared -all c:\XperiaBackup20160618...
0 And the answer is: Write your command well! adb backup -apk -shared -all -f c:\XperiaBackup20160618.ab Little '-f' makes all the difference. Share Improve this answer Follow answered Jun 18,...
How to keep backup or save latest WordPress build in Github
I am making a WordPress website and I might create new builds. How will I keep back up or save my latest builds, I would prefer to use and manage builds through github. Is there a particular way that I can do it in WordPress?
0 Simple way to install this plugin and create your WordPress backup and download it : https://wordpress.org/plugins/duplicator/ Share Improve this answer Follow answered Jul 4, 2016 at 15:13 ...
BackUp using .git?
I was thinking at, for example, I have a website versioned using git (connetted to an online repo), but I m really carefull, so I want to backup my website to an USB device too, maybe with an rsync command. What if I copy ONLY the .git folder? In the case all got broken (pc, server and online repo) except that my pre...
0 Having only the .git file will not allow you to reset everything. You can duplicate a repostiory, but the chances of losing/damaging a USB are much higher than that of the servers (professionally managed) breaking down. Share Improve this answer ...
How to access "locked" files for backup program
I am trying to create a google drive like backup program using python that backs up to a Linux box that will further backup to an off site place tbd. I have ran into a few interesting coding and computer challenges in doing this. The one I am working on right now has to do with "locked" files. So what do I mean by th...
0 Many backup tools use snapshots. Then, they'll copy the locked file directly from the snapshot rather than coping it directly from the filesystem. If you're on Windows you should check Windows VSS, see the Microsoft documentation for more details. Otherwise, if the filesy...
Download / backup all soundcloud user data
I tried searching for a tool that would download all data related to a soundcloud user (uploaded tracks, likes/collection, reposts, playlists, comments, groups etc), backing it up locally, but haven't had luck so far. The user data format is not crucially important, and could be something like XML or JSON. I guess it ...
Not a complete answer, but I'll just gather here a few bits of information that might be useful to somebody eventually. Based on this article https://helgesverre.com/blog/fetch-info-from-soundcloud-api/ First you need to register an app here, where you'll get your client id http://soundcloud.com/you/apps/new $clientid...
Laravel command not working as cron
I have the below command set up for backing up db:backup --database=mysql --destination=s3 --destinationPath=date +\test/%Y%m%d%H%M%S.sql--compression=gzip Code works fine as command Fails with local.ERROR: exception 'BackupManager\ShellProcessing\ShellProcessFailed' with message 'sh: mysqldump: command not found whe...
0 Yep figured out the details. shell path was not initialised when running as cron Solution was to create as shell script and call it from cron with bash_profile initiated before cron crontab * * * * * bash /path/cron.sh cron.sh . .bash_profile <cron command> ...
Synology volume crashed
I have also tried to contact Synology first, but haven't gotten a reply yet. So I was hoping some linux gurus might be able to help out here. I was upgrading some packages on my DS211J Synology drive. During that process the unit became unresponsive. I could not SSH into the drive, access the web interface or access t...
0 Similar thing is happening to me except idont think I've lost any data yet Unresponsive web SSH slow I pulled out three two drives after shutting down and it came back up more responsive I then updated DSM and did smart test all OK Restarted with sll drives back in a...
Has anyone been able to get Android Auto Backup to work?
Has anyone been able to get Android Auto Backup to work? For testing I have done the following: Running adb shell bmgr fullbackup com.company.appname gives me Performing full transport backup Running adb shell bmgr restore com.company.appname gives me Unable to restore package com.company.appname done My original...
0 It works for me, yes. When testing, be sure to call adb shell bmgr run first. After that I called fullbackup, deleted the appdata (not necessary but I wanted to get sure it works) and finally used restore and all the data I configured in the manifest was back. Here are...
Backup & Restore h2 database
I'm little bit confused of how to perform h2 database "BACKUP" & "RESTORE". I have write some code using hibernate and java, but this not working for now. So, how to do backup & restore when database is used by the application. File file = fileChooser.showSaveDialog(tbTabPaneHome.getScene().getWindow()); if (f...
0 You have created a query and not executed it, try running executeUpdate() on the created query Session session = DatabaseUtil.getSessionFactory().openSession(); session.beginTransaction(); Query query = session.createSQLQuery("BACKUP TO '" + file.getCanonicalPath() + "'")...
Use mysql triggers to backup row after updating events
I found this question MYSQL Trigger Update Copy Entire Row Where the suggestion to use the following code answer partially to my personal question to perform a row backup after altering a DB row: DROP TRIGGER auditlog CREATE TRIGGER auditlog AFTER UPDATE ON frequencies FOR EACH ROW BEGIN INSERT INTO frequenci...
0 I know this question is old, but I stumbled upon exactly the same question. For me, just adding the missing fields directly like in: INSERT INTO frequencies_audit select *,"insert" as operation from frequencies where id = NEW.id worked fine for me. For more realistic cas...
Merge SQL databases keeping one index
I have to recover a SQL 2008 R2 database for a POS system that broke down without proper backups in place. The .BAK file has been recovered, but was corrupted. However, I was able to retrieve most of the data and get it back into usable shape. My problem now is as following: I have database A, which is a fresh install...
One simple way is to use the builtin command line tool tablediff.exe. It can compare two tables/views, and print out the differences. The tablediff utility is used to compare the data in two tables for non-convergence, and is particularly useful for troubleshooting non-convergence in a replication topology. This util...
Using with rsync to MS SharePoint
I've searched large and deep, but nothing is available, as far as I can see. TLDR: How can I use rsync with a SharePoint installation? (Or something like rsync) Long description We have a large install base of Macs (~50%), Windows (~40%), and Linux (~10%), so our environment is pretty heterogeneous. Being an experime...
0 OneDrive for Business has a download that will allow you to synchronize a directory locally. https://onedrive.live.com/about/en-us/download/ For a Linux platform, you should be able to use onedrive-d found here: https://github.com/xybu/onedrive-d Share Improve ...
Nexus 3 Docker container and Backup
I'm testing Nexus 3 from Docker container and I'm using https://github.com/sonatype/docker-nexus/blob/94d654faa2166b60fe2a4ad9629ff418a305dcb9/oss/Dockerfile. The issue is that when I upload artifact to the Nexus I cant find it in the file system in order to create backup. The folder /sonatype-work is empty. I've succ...
0 Try the helicopterizer for Backup and Restore for Docker Container in the Cloud Providers. https://github.com/frekele/helicopterizer Share Improve this answer Follow answered Apr 18, 2016 at 17...
SQL Azure Export and Import into local SQL Server 2012 - Unknown block type. Stream might be corrupted
I have a SQL Azure database which is approximately 10GB in total size. I wanted to have a local copy of the database for development so I saved an export of the database to my storage account and downloaded it. I was a little suspicious when the backup size was 500MB but I backed up the database twice, the file size w...
0 Please try with the latest version of SSMS that you can download and install from SQL Server Management Studio Download page Azure SQL Database has a numerous new features being added in a fast pace manner. SSMS from this unified download page provides up-to-date suppor...
Azure MarsAgent Upgrade Failed
I have an issue, I am trying to upgrade the MarsAgent (Azure agent) on a Windows 7 PC. When I try to update it I get the error: "An unexpected error occurred during the installation. For more details check the setup error logs.(Error ID: 116)". You then press OK on that error and I am then presented with "Error star...
0 I was also getting same error whet tried to installed MarsAgent on win2016 server. I tried many articles but no luck. When I selected installed with window updates it shown me error for window update service. so I checked Windows update service found it was in disabled ...
Command line for Dropbox connection in Duplicati backup
I'm trying to backup Folders from local drive to Dropbox using Duplicati command in Command prompt. (Backup should be Incremental) C:\Users\Desktop\Office_Works\Duplicati\Duplicati 1.3.4\Duplicati>Duplicati.CommandLine.exe backup a https://www.dropbox.com/ Enter passphrase: ** Confirm passphrase: ** **Unable to find ...
0 There is no direct support for DropBox in Duplicati. Others have reported using a local folder under the DropBox folder as a destination, such that the DropBox client synchronizes the folder for you. Share Improve this answer Follow ...
rsync --exclude 'folder', copies that folder anyway
There are a lot of posts about this, I know, but I tried all and still can't get it working. If this is my folder to backup: /home/user/thingstobackup the script will create a "backup" folder here and inside another folder named as the date of today. The daily backup is copied inside. No matter how I use rsync, the "...
I do not know why --exclude does not work here.. but I modified the find command and I managed to let this thing work. FIND="`find $TOSAVE -mindepth 1 -type d \( -path $TOSAVE/backup \) -prune -o -mtime -1 -print`"
Basic Azure Storage getting started. Create Scheduled File back up
This is probably a basic question but all I am looking for in Azure is the ability to back up files on my Windows Server at a scheduled time. MS SQL, MySQL and Web Site Files. I have created a Trial account and a Storage plan but need a pointer to which section of the Dashboard I should be visiting - it isn't immediat...
I assume you are asking about backing up your Windows server running as a VM instance on Azure. Below is the latest Azure VM backup guide from Microsoft. Hope it helps! Azure virtual machine back up
NDMP Daemon for debian
I'm looking for an open source which implement NDMP protocol in Debian, but not successful yet. I tried to install and run NDMP SDK (https://code.google.com/p/ndmp4linux/downloads/detail?name=ndmpkit.v3.2.tar.gz), ndmjob, opendmp, ndmfs, but some of these tools can not be installed in Debian (NDMP SDK), the other runn...
0 As far as I know, you can use Bareos for that. You can install the dummy package bareos via apt-get, and that will pull in with it the bareos-storage package, which should include support for NDMP. Share Improve this answer Follow ...
HP Data Protector - very long backup duration
I perform incremental backup of my files on more servers everyday . The last two days time to backup is longer than usual: Last monday: Start time 21:00:05 End Time: 23:35:34 Yesterday: Start time 21:00:05 End Time: 08:40:31 (today) There are no errors in logs In log of this execution I do not see any pieces of infor...
0 In MFC GUI go to file->preferences->debugging-> 1.debug range 1-200 2. debug file name debug.txt 3. Use these settings permanently -> relaunch GUI now... run your session. now check current session debugs in Programdata->omniback->tmp. Share Improve this answ...
Ubuntu server extract O.S Image
I have a server running on Ubuntu server LTS 14.04 and I need to do an entire copy of the operating system including apps, files, databases, everything. I've read the most straightforward way to do this is make an O.S image backup but I didn't find a practical tutorial about how to do this and how to restore this imag...
0 You likely found your answer by now doing some more research but I had the same question and found the following useful answers: https://serverfault.com/a/128617/362650. This one is especially useful if you happen to need to set back your virtualized server to your physi...
What's the correct way to take automatic backups of docker volume containers?
I am in the process of building a simple web application using NodeJS that persists data to a MySQL database and saves images that have been uploaded to it. With my current setup, I have 4 Docker containers - 1 for the NodeJS application, 1 for the MySQL server, 1 Volume Container for the MySQL Data and 1 Volume conta...
0 To backup your database I suggest to use mysqldump, that is more safer then a simple file copy. For volume backup you can also run a container, link the volume and tar the contents together. In both cases you can use additional containers or process injection via docker e...
SQL Server EXEC backup table with date dynamically
I am looking to backup a table and auto add the date to the end of the table name. Here is what I have declare @table char(36)= 'template_fields' EXEC('select * into '+@table+'_'+'convert(date, getdate()) from '+@table) And I want the end result to look something like template_fields_09-09-2015 What am I missing h...
0 Just print what you do: DECLARE @table NVARCHAR(MAX) = 'tab'; DECLARE @sql NVARCHAR(MAX) = 'select * into '+@table+'_' +'convert(date, getdate()) from '+@table; SELECT @sql; you will get: select * into tab_convert(date, getdate()) from tab You need to pass date wit...
Which snapshot should I use to restore data after accidental truncate?
Data has been deleted from a production DB using a TRUNCATE command accidentally and I don't know how I should restore it. I've read about auto_snapshot [1] and fortunately this option is on. We have a bunch of snapshots (listed below) in a snapshots folder and we don`t know which of them we should use to restore the ...
0 You would need to use the latest snapshot (or the most recent snapshot before the truncate if there have been additional snapshots after the truncate). Cassandra uses hard links when creating snapshots, which is why the sizes of those snapshots are so different. Do get t...
Website (file system & database) backups never seem to complete
I'm trying to get my website (file system & database) to backup in Azure portal but the backup does not seem to ever complete. The steps i have taken are as follows: I went to my website Clicked on backups I chose my storage account and also added a database backup too. I hit save I wanted to test that the backup w...
0 I suspect the credentials you are using for the database in your Connection Strings in the portal do not have sufficient rights to script out the database. The backup routine needs to script out your DB and extract all your data to work properly. Here is a helpful artic...
Tar backup error
I followed this question: How to backup filesystem with tar using a bash script? But when I run the script it gives following error: : not found/backup.sh: 2: /etc/init.d/backup.sh: : not found/backup.sh: 5: /etc/init.d/backup.sh: : not found/backup.sh: 7: /etc/init.d/backup.sh: : not found/backup.sh: 10: /etc/init...
0 As "That other guy" commented the solution here was to run the dos2unix convert command on the bash file: sudo dos2unix /etc/init.d/backup.sh and running it using bash command not sh command: sudo bash /etc/init.d/backup.sh Share Improve this answer ...
Verifying a git repository (Stash) restore
We have disaster recovery plans that mean we take a backup of our git installation (Atlassian Stash in our case) and restore it on a test server to verify the backup was a good one. If the restore process fails then we have a problem but we're wondering about going a bit further when the restore is a success and verif...
0 You can use the commands in this SO question to verify you local and remote are same. Just iterate through each branch and check that they are the same In case your backup is just backing up the bare repository , you can do a unix diff command to verify that your backup ...
CodeIgniter Backup Database is not working
I am using CodeIgniter Backup database utility class. But it is giving me an error of Unsupported feature of the database platform you are using. Filename: E:\xampp\htdocs\zafarsir\system\database\drivers\mysqli\mysqli_utility.php Line Number: 82 Here is my code $this->load->dbutil(); // // Backup your entire...
0 function backup_Eventtable() { $this->load->dbutil(); $prefs = array( //'tables' => array('hotel_accomodation'), // Array of tables to backup. 'ignore' => array(), // List of tables to omit from the backup ...
Nandroid backup failed exitcode[127]
I need to create a customized flashable ROM, by customized i mean i will add some apps into it and redistribute this new ROM. Now, first of all I've read that I could create a flashable ROM through Nandroid backups. but somehow when installed and execute a Clockwork backup it returns just this: Starting backup... Runn...
0 See 127 Return code from $?. Check if busybox is installed. Share Improve this answer Follow edited May 23, 2017 at 10:24 CommunityBot 111 silver badge answered May 3, 2015 at 11...
.Bat File - deleting 4 days old backup if atleast 3 days old file already exist
This is my first post & take in mind my native language isn't English. .bat file so far: C: Cd\ forfiles /p Z:\SQL /s /m *.bak /d -4 /c "cmd /c del /q @path" forfiles /p Z:\SQL /s /m *.trn /d -4 /c "cmd /c del /q @path" What I want with this file: I want it to delete 4 days old backup & log files. This .Bat file w...
0 You can count them ahead of time to make the decisions. Here's one way to do it. Unfortunately FORFILES doesn't allow you to easily find files newer than 4 days ago, so we find the older ones and subtract from the total. Loop through the files and add the ones that matc...
keep n retention and delete old one
I have the code below which looks for 2 keys and deletes the old one. That means I only have one data-retention def delete_old_snap(self, volumeid): list_snap = self.snapshots() def doubles(l): keys = [i["volume_id"] for i in l if i["volume_id"] == volumeid] keys = {k for k in keys if keys.co...
start by creating a dictionary where each key is a volume id import dateutil.parser as p d = {} for snapshot in snapshots: snapshot["created_at"] = p.parse(snapshot["created_at"]) try: d[snapshot["volume_id"]].append(snapshot) except KeyError: d[snapshot["volume_id"]]=[snapshot] now you should...
BackupAgentHelper with multiple sets of SharedPreferences
I have trouble unterstanding the keyPrefix of the addHelper() method. Does it need to be unique for each BackupAgentHelper Class Instance or for each SharedPreferencesBackupHelper ? I want to backup two or more sets of SharedPreferences: Example: public class PrefsBackupAgent extends BackupAgentHelper { // Alloca...
0 Your first example is correct. public class MyBackupAgentHelper extends BackupAgentHelper { static final String DEFAULT_PREFS = "packagename_preferences"; static final String OTHER_PREFS = "packagename_other_preference"; // A key to uniquely identify the s...